アセット
概要
using Sirenix.OdinInspector; using UnityEngine; public class Example : MonoBehaviour { [Button] private void Default( float t, float b, float[] c ) { } [Button( ButtonSizes.Medium, ButtonStyle.FoldoutButton )] private int FoldoutButton( int a = 2, int b = 2 ) { return a + b; } [Button( ButtonSizes.Large, ButtonStyle.Box, Expanded = true )] private int ExpandedButton( int a = 2, int b = 2 ) { return a + b; } }
「Button」属性を使用することで
引数のある関数を Inspector から実行できます