Created
December 27, 2022 05:35
-
-
Save kurtdekker/ae7c4c9f7152c363d6d58732175af0bb 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 hidden or 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