36 lines
641 B
C#
36 lines
641 B
C#
using UnityEngine;
|
|
|
|
namespace BitStrap.Examples
|
|
{
|
|
public class CreateExample : MonoBehaviour
|
|
{
|
|
public GameObject prefab;
|
|
|
|
[Button]
|
|
public void CreateDummyBehaviourInstanceAsChild()
|
|
{
|
|
if (Application.isPlaying)
|
|
{
|
|
Create.Behaviour<DummyBehaviour>(base.transform);
|
|
}
|
|
else
|
|
{
|
|
Debug.LogWarning("In order to see Create working, please enter Play mode.");
|
|
}
|
|
}
|
|
|
|
[Button]
|
|
public void CreatePrefabInstanceAsChild()
|
|
{
|
|
if (Application.isPlaying)
|
|
{
|
|
Create.Prefab(prefab, base.transform);
|
|
}
|
|
else
|
|
{
|
|
Debug.LogWarning("In order to see Create working, please enter Play mode.");
|
|
}
|
|
}
|
|
}
|
|
}
|