OnValueChanged only be triggered at the first layer

Issue #260 closed
wavebit created an issue
public class DataNode
    public DataNode Next;

    private static int IdCounter;

    public int Id;

    public DataNode()
        Id = IdCounter;

    private void OnNextChanged()
        Test.LogStr = Id + " NextChanged";

public class Test : SerializedMonoBehaviour
    public static string LogStr;
    [ShowInInspector, ReadOnly]
    public string Log
            return LogStr;

    public DataNode Head;


Comments (2)

  1. Bjarke Elias

    The OnValueChanged attribute has overload that enables that behavior.

    [OnValueChanged("OnNextChanged", IncludeChildren : true)]
  2. wavebit reporter

    It is confused if the IncludeChildren is false, I thought it is triggered when property Next is assigned a new value, then it calls itself method OnNextChanged().

  3. Log in to comment