Example #1
0
        void DrawILObject(string fieldName, string fieldKey, string fieldType, ILHotMonoProxyStruct monoStruct, IrpClassInfo fieldClassInfo, bool draw)
        {
            ILHotMonoProxy currentValue = null;

            if (monoStruct.ComponentValues.ContainsKey(fieldKey))
            {
                currentValue = monoStruct.ComponentValues[fieldKey] as ILHotMonoProxy;
            }

            if (draw)
            {
                currentValue = EditorGUILayout.ObjectField(fieldKey, currentValue, typeof(ILHotMonoProxy), true) as ILHotMonoProxy;
            }

            monoStruct.NewComponentValues.Add(fieldKey, currentValue);
            if (monoStruct.NewComponentValues.ContainsKey(fieldKey))
            {
                PickILHotMonoValues(fieldKey, monoStruct, (ILHotMonoProxy)monoStruct.NewComponentValues[fieldKey]);
            }
        }
Example #2
0
        void PickILHotMonoValues(string filedKey, ILHotMonoProxyStruct monoStruct, ILHotMonoProxy monoProxy)
        {
            for (var index = 0; index < monoProxy.BoolNames.Count; index++)
            {
                monoStruct.NewBoolValues.Add(string.Concat(filedKey, ".", monoProxy.BoolNames[index]), monoProxy.BoolValues[index]);
            }

            for (var index = 0; index < monoProxy.FloatNames.Count; index++)
            {
                monoStruct.NewFloatValues.Add(string.Concat(filedKey, ".", monoProxy.FloatNames[index]), monoProxy.FloatValues[index]);
            }

            for (var index = 0; index < monoProxy.StringNames.Count; index++)
            {
                monoStruct.NewStringValues.Add(string.Concat(filedKey, ".", monoProxy.StringNames[index]), monoProxy.StringValues[index]);
            }

            for (var index = 0; index < monoProxy.ObjectNames.Count; index++)
            {
                monoStruct.NewObjectValues.Add(string.Concat(filedKey, ".", monoProxy.ObjectNames[index]), monoProxy.ObjectValues[index]);
            }
        }