tips4unity's profile picture. Maintained by @schattenkindnet | Feel free to contact me (hagish@schattenkind.net) with tips/suggestions/.. | Don't forget the #unitytips on Tuesdays

Unity Tips & Tricks

@tips4unity

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

A tutorial how to use particles to visualize graphs like sine waves | bit.ly/1qKQJKZ


Disable "Edit -> Preferences -> General -> Auto Refresh" to disable recompiling/reloading on change, "Asset -> Refresh" to manually trigger.


Pressing Ctrl while moving an object snaps the position to full world units.


|>| Frame Skip Button (next to || Pause) can be used to proceed 1 frame at a time | bit.ly/1pP7ynS


Start a Coroutine within another Coroutine: "IEnumerator MyCo() { yield return StartCoroutine(OtherCo()); }"


Run a Coroutine blocking: "IEnumerator it = MyCoroutine(); while (it.MoveNext());"


[MenuItem ("CONTEXT/Rigidbody/Lala")] adds a menu item called "Lala" to a Rigidbody's context menu | bit.ly/1kJHwLc


[MenuItem ("Window/Something %g")] with shortcut g (ctrl-g on Windows, cmd-g on OS X) | other modifiers: # shift, & alt , _ no mod


[MenuItem("Assets/My")] static void My() {} creates an My entry in the Asset context menu | thx to salomon | bit.ly/1kJHwLc


Check Editor.log "Used Assets, sorted by uncompressed size:" to check why the build is too big | bit.ly/1pVw1b2


"EditorApplication.OpenScene("Assets/Scenes/my.unity");" opens a scene (check SaveCurrentSceneIfUserWantsTo) | bit.ly/1hz8El2


Notification in editor window | ShowNotification(new GUIContent(EditorGUILayout.TextField("Hello"))); | bit.ly/SH3pnN


"Object.Destroy(Object obj, float t = 0.0F);" has a timeout to delay destruction by t seconds


"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 | bit.ly/22TWOW3


Nice 4.5 details: SelectionBase, DecoratorDrawers, UNITY_PRO_LICENSE define, ability to serialize structs | bit.ly/Tc9eKw


In project search "t:scene" shows only scenes, "t:texture" only textures. You can use "t:NAME_A_TYPE_HERE".


Custom component icons | Click a script in the inspector and change the icon similar to this bit.ly/1oUy1xt


Loading...

Something went wrong.


Something went wrong.