Skip to content

Commit

Permalink
重构newButton
Browse files Browse the repository at this point in the history
  • Loading branch information
KumoKyaku committed Dec 30, 2023
1 parent 6daac09 commit ccb987d
Show file tree
Hide file tree
Showing 2 changed files with 399 additions and 234 deletions.
66 changes: 40 additions & 26 deletions Megumin.UnityPackage/Assets/TestLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class TestLog : MonoBehaviour
[Indent]
public Color TestColor;
public HexColor HexColor;
[NewButton]
public List<Loger> Loggers;
public List<Test12345> Test12345s;

Expand All @@ -43,7 +44,46 @@ public class TestLog : MonoBehaviour

//[OnValueChanged(CallBackName = "OnValueChangeTest1")]
public STest STest;
[NewButton]
public SaveAsset SaveAsset;


public Pref<bool> GlobalToggle;
[SerializeReference]
//[NewButton]
[SerializeReferenceNewButton]
public IStest TestRef;

[SerializeReference]
[NewButton]
//[SerializeReferenceNewButton]
public IStest TestRef2;

[SerializeReference]
//[SerializeReferenceNewButton]
[NewButton]
public List<STest> TestRefList;


public enum TestEnum
{
Aaa,
Bbb,
}

private void OnValidate()
{

}

public void OnValueChangeTest1()
{
Debug.LogError($"OnValueChangeTest1 {STest.intb}");
}

public TestScriptObject TestScriptObject;


void Start()
{
string message = ColorUtility.ToHtmlStringRGBA(Color.green);
Expand Down Expand Up @@ -97,14 +137,6 @@ public void TestParseColor()
}


public Pref<bool> GlobalToggle;
[SerializeReference]
[SerializeReferenceNewButton]
public IStest TestRef;

[SerializeReference]
[SerializeReferenceNewButton]
public List<STest> TestRefList;

[Button]
public void TestQ()
Expand Down Expand Up @@ -137,24 +169,6 @@ public void Test3(int? loger)
{
this.LogCallerMemberName();
}

public enum TestEnum
{
Aaa,
Bbb,
}

private void OnValidate()
{

}

public void OnValueChangeTest1()
{
Debug.LogError($"OnValueChangeTest1 {STest.intb}");
}

public TestScriptObject TestScriptObject;
}

public interface IStest
Expand Down
Loading

0 comments on commit ccb987d

Please sign in to comment.