• check if an object is in front of another object

    #UnityTips If you want to check if an object is in front of another object you can use the InverseTransformPoint method. As long as you follow the "z is fo

  • three ways of running through a list of derived classes

    #UnityTips Today we have three ways of running through a list of derived classes. See our code example for more details.#coding #indiedev #gamedev pic.twitter.c

  • unity VideoPlayer with an URL

    #UnityTips If you use an unity VideoPlayer with an URL you might want to resize your raw image.The clip won't be available for the calculations.Subscribe to

  • Did you ever need a const dictionary

    #UnityTips Did you ever need a const dictionary?According to the C# specification, switch-case tables are compiled to constant hash jump tables. 🤔ǹ

  • How to get started with unit tests

    #UnityTips How to get started with unit tests in your project:Select TestRunner from the Window->General menu and create an assembly.In Visual Studio Right C

  • access and edit those from the asset files in the ProjectSettings folder

    #UnityTips Ever needed to set some project settings and found out there is no API access to it? You can access and edit those from the asset files in the Projec

  • you can add multiple types to [RequireComponent]

    #UnityTips Of course it is common knowledge to add the attribute [RequireComponent] to your scripts to have unity put those Components onto your GameObject.But

  • prevent instantaneous execution of OnValidate

    #UnityTips Use the [Delayed] attribute in your editor code to prevent instantaneous execution of OnValidate. It will only execute when enter is pressed or the f

  • 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