why is the object not attached wehen i start the game unity code example
Example: how to run code without a gameobject unity
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
// Make sure you remove the "MonoBehaviour"
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]
// Make sure you remove the "MonoBehaviour"