control the handling of your scripts color fields
#UnityTips Use the [ColorUsage] attribute to control the handling of your scripts color fields.You can enable hdr in the dialog and/or disable alpha depending o
Improve handling your enums in the inspector
#UnityTips Improve handling your enums in the inspector by giving them a better description for the values with the [InspectorName] attribute 😎#gamedev
Awake, OnEnable and Start will not run on deactivated objects
#UnityTips Make sure your own code runs before the default MonoBehaviour methods / messages when instantiating new GameObjects by disabling the object first.Awa
Use the [HelpURL(string url)] attribute
#UnityTips Use the [HelpURL(string url)] attribute to make use of the little question mark icon in the inspector to link your own documentation.#gamedev #indied
cinemachine camera frustum
#UnityTips If the cinemachine camera frustum gets in the way of your lighting work and you can't find the Gizmo to turn it off just collapse the Cinemachine
change a shader property via scripting
#UnityTips If you would like to change a shader property via scripting like this:material.SetFloat("_Glossiness", 0.5f);You can get the string by sele
„TV“ in your scene
#UnityTips For a "TV" in your scene showing other parts of the same scene, you may run into an expensive setup.This script can adjust your 2nd camera
unnecessary long switch case constructions
#UnityTips Certain Developers still use unnecessary long switch case constructions.This is a much better way utilizing an abstract base class implement all func
more impact by using a script
#UnityTips Give your fire animations more impact by using a script on a point light!Let the light dance in a random pattern to simulate the movement of the flam
compiler warnings synchronized in Visual Studio & the Unity console
#UnityTips If you want to have your compiler warnings in Visual Studio & the Unity console synchronized, you need to uncheck the "Suppress Common Warnings"
movement in background
#UnityTips If you need some movement in your background, you can use a particle systems set it to bursts and add a simple sprite sheet to create randomly genera
serialize Lists from abstract base classes or custom interfaces
#UnityTips With [SerializeReference] you can serialize Lists from abstract base classes or custom interfaces.We will link this tweet from now on when we read in
inject functions into classes with extension methods
#UnityTips You can actually inject functions into classes with extension methods 🤩This is great for extending functionality of any class, such as Vector
Be aware of the difference: Renderer.material / Renderer.sharedMaterial
#unitytips Be aware of the difference:Renderer.material(s) instantiates a new object, which are not garbage collected. You have to destroy it, to avoid memory l
search the hierarchy for specific components
#UnityTips You can search the hierarchy for specific components by entering t: ComponentNameThis works also for your custom MonoBehaviours.#indiedev #gamedev pi