コード例 #1
0
 static int SerializedPropertyChanged(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         ShibaInu.Picker obj  = (ShibaInu.Picker)ToLua.CheckObject <ShibaInu.Picker>(L, 1);
         bool            arg0 = LuaDLL.luaL_checkboolean(L, 2);
         obj.SerializedPropertyChanged(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #2
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();


            // property field
            bool clean, changed = false;

            EditorGUILayout.PropertyField(m_hitArea, m_c_hitArea);
            serializedObject.ApplyModifiedProperties();

            EditorGUILayout.PropertyField(m_itemPrefab, m_c_itemPrefab);
            clean = serializedObject.ApplyModifiedProperties();

            EditorGUILayout.PropertyField(m_itemOffsetCount, m_c_itemOffsetCount);
            changed = changed || serializedObject.ApplyModifiedProperties();

            EditorGUILayout.PropertyField(m_itemAlphaOffset, m_c_itemAlphaOffset);
            changed = changed || serializedObject.ApplyModifiedProperties();

            EditorGUILayout.PropertyField(m_itemScaleOffset, m_c_itemScaleOffset);
            changed = changed || serializedObject.ApplyModifiedProperties();


            if (changed || clean)
            {
                m_picker.SerializedPropertyChanged(clean);
            }


            // isVertical and isBounces
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField(m_c_options, m_labelWidth);
            bool isVertical = EditorGUILayout.ToggleLeft(m_c_isVertical, m_picker.isVertical, m_halfWidth);

            MarkSceneDirty(isVertical != m_picker.isVertical);
            m_picker.isVertical = isVertical;
            bool isBounces = EditorGUILayout.ToggleLeft(m_c_isBounces, m_picker.isBounces, m_halfWidth);

            MarkSceneDirty(isBounces != m_picker.isBounces);
            m_picker.isBounces = isBounces;
            EditorGUILayout.EndHorizontal();


            EditorGUILayout.PropertyField(m_scrollRatio, m_c_scrollRatio);
            serializedObject.ApplyModifiedProperties();
        }