Skip to content

Instantly share code, notes, and snippets.

@olegmrzv
Last active May 29, 2024 14:03
Show Gist options
  • Save olegmrzv/5adbe4146e95e2938c555f79ca8935f5 to your computer and use it in GitHub Desktop.
Save olegmrzv/5adbe4146e95e2938c555f79ca8935f5 to your computer and use it in GitHub Desktop.
public class SomeComponent : MonoBehaviour
{
private void Awake()
{
transform.position = new Vector3(1, 1, 1);
}
private void Start()
{
transform.position = new Vector3(2, 2, 2);
}
}
public static class Entry
{
[RuntimeInitializeOnLoadMethod]
public static void Initialize()
{
var obj = new GameObject();
obj.AddComponent<SomeComponent>();
obj.transform.position = new Vector3(3, 3, 3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment