Unity Tips & Tricks (@tips4unity) header
Unity Tips & Tricks (@tips4unity) profile picture

Maintained by @schattenkindnet | Feel free to contact me ([email protected]) with tips/suggestions/.. | Don't forget the #unitytips on Tuesdays

Joined May 2014
Photo by Unity Tips & Tricks (@tips4unity)
A tutorial how to use particles to visualize graphs like sine waves | https://teapaw.org/t.co/JdjOOe7kTM
3
6
Disable "Edit -> Preferences -> General -> Auto Refresh" to disable recompiling/reloading on change, "Asset -> Refresh" to manually trigger.
1
4
Pressing Ctrl while moving an object snaps the position to full world units.
1
7
|>| Frame Skip Button (next to || Pause) can be used to proceed 1 frame at a time | https://teapaw.org/t.co/vRHdKBPoRV
Start a Coroutine within another Coroutine: "IEnumerator MyCo() { yield return StartCoroutine(OtherCo()); }"
4
Run a Coroutine blocking: "IEnumerator it = MyCoroutine(); while (it.MoveNext());"
4
[MenuItem ("CONTEXT/Rigidbody/Lala")] adds a menu item called "Lala" to a Rigidbody's context menu | https://teapaw.org/t.co/9xRbhkMjyw
1
3
[MenuItem ("Window/Something %g")] with shortcut g (ctrl-g on Windows, cmd-g on OS X) | other modifiers: # shift, & alt , _ no mod
2
3
[MenuItem("Assets/My")] static void My() {} creates an My entry in the Asset context menu | thx to salomon | https://teapaw.org/t.co/9xRbhkMjyw
1
foreach (Transform child in transform) iterates over all direct childs | https://teapaw.org/t.co/ggTgQbPWY1
1
2
Check Editor.log "Used Assets, sorted by uncompressed size:" to check why the build is too big | https://teapaw.org/t.co/QynjhLW5Um
"EditorApplication.OpenScene("Assets/Scenes/my.unity");" opens a scene (check SaveCurrentSceneIfUserWantsTo) | https://teapaw.org/t.co/l0WI9u5wRK
1
Notification in editor window | ShowNotification(new GUIContent(EditorGUILayout.TextField("Hello"))); | https://teapaw.org/t.co/3MINiEGm1E
2
6
"Object.Destroy(Object obj, float t = 0.0F);" has a timeout to delay destruction by t seconds
3
"yield return new WaitForSeconds(1f);" will never stop if "Time.timeScale = 0f;"
[SelectionBase] attribute to mark its GameObject as a selection base object for Scene View picking | https://teapaw.org/t.co/W8yxw3YsCa
2
3
Nice 4.5 details: SelectionBase, DecoratorDrawers, UNITY_PRO_LICENSE define, ability to serialize structs | https://teapaw.org/t.co/piw3qpbRd0
1
In project search "t:scene" shows only scenes, "t:texture" only textures. You can use "t:NAME_A_TYPE_HERE".
4
Custom component icons | Click a script in the inspector and change the icon similar to this https://teapaw.org/t.co/FHJzsasiSZ