This commit is contained in:
Даниил Заикин
2026-06-17 20:44:53 +03:00
parent 9d153773c2
commit b133e7c656
1880 changed files with 244545 additions and 0 deletions
@@ -0,0 +1,39 @@
using System.Collections;
using UnityEngine;
namespace NaughtyAttributes.Test
{
public class ButtonTest : MonoBehaviour
{
public int myInt;
[Button(enabledMode: EButtonEnableMode.Always)]
private void IncrementMyInt()
{
myInt++;
}
[Button("Decrement My Int", EButtonEnableMode.Editor)]
private void DecrementMyInt()
{
myInt--;
}
[Button(enabledMode: EButtonEnableMode.Playmode)]
private void LogMyInt(string prefix = "MyInt = ")
{
Debug.Log(prefix + myInt);
}
[Button("StartCoroutine")]
private IEnumerator IncrementMyIntCoroutine()
{
int seconds = 5;
for (int i = 0; i < seconds; i++)
{
myInt++;
yield return new WaitForSeconds(1.0f);
}
}
}
}