Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
紐付け
public class SamplePrefab : MonoBehaviour
{
public Func<GameObject> Generator
{
get{ return () => Instantiate(this); }
}
}
public class SampleClass : MonoBehaviour
{
[SerializeField]
SamplePrefab prefab;
void Awake()
{
prefab.Generator();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.