-
-
Save kwalkerxxi/1d772f165df5ad3821963e38a0ac71f5 to your computer and use it in GitHub Desktop.
a way to put design elements in your Unity scene so they disappear when you play.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
// @kurtdekker - Attach this script to GameObjects you | |
// want to have in your scene for alignment and design, | |
// but you want to be destroyed during real gameplay. | |
public class DestroyOnAwake : MonoBehaviour | |
{ | |
void Awake() | |
{ | |
// and you can comment this out and run and you will have | |
// all your guides still in project at runtime!! | |
Destroy(gameObject); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment