コード例 #1
0
 public override void OnInspectorGUI()
 {
     serializedObject.Update();      //更新对象最新数据
     table.FlushVariableDic();
     repeatList.Clear();
     //标记重复的变量
     if (table.Variables != null)
     {
         for (int i = 0; i < table.Variables.Length; i++)
         {
             if (table.GetRepeatVariable().Contains(table.Variables[i].Name))
             {
                 repeatList.Add(i);
             }
         }
         list.drawElementBackgroundCallback = (rect, index, isActive, isFocused) =>
         {
             if (repeatList.Contains(index))
             {
                 GUI.backgroundColor = Color.red;
             }
             else
             {
                 GUI.backgroundColor = Color.white;
             }
         };
     }
     list.DoLayoutList();
     serializedObject.ApplyModifiedProperties();
 }
コード例 #2
0
        static int _m_FlushVariableDic(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


                UIVariableTable gen_to_be_invoked = (UIVariableTable)translator.FastGetCSObj(L, 1);



                {
                    gen_to_be_invoked.FlushVariableDic(  );



                    return(0);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }