Files
UltimateFishing/Assets/Scripts/Assembly-CSharp/BitStrap/Examples/CreateExample.cs
2026-02-21 16:45:37 +08:00

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.");
}
}
}
}