UnityEditor.SerializedModule.GetProperty C# (CSharp) Method

GetProperty() public method

public GetProperty ( string name ) : UnityEditor.SerializedProperty
name string
return UnityEditor.SerializedProperty
        public SerializedProperty GetProperty(string name)
        {
            SerializedProperty property = this.m_Object.FindProperty(Concat(this.m_ModuleName, name));
            if (property == null)
            {
                Debug.LogError("GetProperty: not found: " + Concat(this.m_ModuleName, name));
            }
            return property;
        }

Same methods

SerializedModule::GetProperty ( string structName, string propName ) : UnityEditor.SerializedProperty

Usage Example

示例#1
0
 private void Init(SerializedModule m, string name)
 {
     this.m_MaxGradient   = m.GetProperty(name, "maxGradient");
     this.m_MinGradient   = m.GetProperty(name, "minGradient");
     this.m_MaxColor      = m.GetProperty(name, "maxColor");
     this.m_MinColor      = m.GetProperty(name, "minColor");
     this.m_MinMaxState   = m.GetProperty(name, "minMaxState");
     this.m_AllowColor    = true;
     this.m_AllowGradient = true;
     this.m_AllowRandomBetweenTwoColors    = true;
     this.m_AllowRandomBetweenTwoGradients = true;
 }
All Usage Examples Of UnityEditor.SerializedModule::GetProperty