Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
For when you really want that one line for instantiation and initialisation.
class MyBehaviour : MonoBehaviour
public MyBehaviour Init (int some, float parameters)
return this;
// Examples:
// MyBehaviour instance = new GameObject ("Moo").AddComponent<MyBehaviour>().Init (1, 5.5f);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment