Sometimes we have related sprites that can be used in a prefab, like sprites for the environment, props, and scenario. Would be cool if we can easily swap them directly on the prefab without need to find and set the sprite directly in the SpriteRenderer component? SpritesCollection component I created...Read "unitytips: Sprites Collection"
These days were studying polygons and thought that would be cool build a triangle classifier to help people learn and teach about types of triangle. Types of triangle Triangles can be classified by lengths of sides and by internal angles. By lengths of sides Equilateral: all three sides have the...Read "Triangle Classifier Made With Unity"
If you try to use a ShadowCaster2D in a SpriteShape the shadow produced will have a box form, no matter the form of your SpriteShape. This happens because ShadowCaster2D does not update its internal shape according to the SpriteShape's form. ShadowCaster2DFromCollider component I created this script to help to have...Read "unitytips: ShadowCaster2DF..."
Recently, I was doing a small experiment trying to run an CHIP-8 emulator inside the Unity Editor inspector window and for that I needed to update from times to time the inspector. Initially I tried to use EditorApplication.update, but as it is only called when something changes in the inspector,...Read "unitytips: Editor Coroutines"
Starting in Unity 2020.1, you can add a dedicated inspector window for a specific GameObject, Component, or Asset. It always displays the properties of the item you opened it for, even if you select something else in the editor. To activate a Focused Inspector, select an item (GameObject, Component, or...Read "unitytips: Focused Inspector"
You can add a custom section to Project Settings window that allows you to configure some global settings for your project using a SettingsProvider Setup You can easily import this gist directly into your Unity 3D project using the Gist ImporterRead "unitytips: SettingsProvider"
You can create a PropertyAttribute to display a help box on inspector showing a few lines of information, like EditorGUI.HelpBox, but with a docs button to the documentation page. Setup You can easily import this gist directly into your Unity 3D project using the Gist Importer UsageRead "unitytips: HelpBox Attribu..."
Using Süleyman Yasir KULA Unity Native Share Plugin you can easily add native share to your Android/iOS games. I made the gist below that uses the plugin to add a social share component to any game object. Code You can easily import this gist directly into your Unity 3D project...Read "unitytips: Social Share"
You can create a simple logging component to record logs from any UnityEvent and configure them directly in the editor: Code You can easily import this gist directly into your Unity 3D project using the Gist ImporterRead "unitytips: Dynamic Log"
You can use EditorApplication.isPlaying in your custom editor to update the game view when a ScriptableObject is updated and you need to restart the scene or do something more complex to see the result of ScriptableObject changed during the game’s playing in the editor.Read "unitytips: Using Scriptabl..."