private void InitDrawer()
 {
     typeDrawer = NativeDrawerUtility.CreateDefaultTypeDrawer(this);
     if (typeDrawer == null)
     {
         if (NativeDrawerUtility.IsTypeSupported(ValueType))
         {
             if (TypeUtility.IsStructOrClass(ValueType) && Value != null)
             {
                 drawerObject = new NativeDrawerObject(Value);
             }
         }
     }
 }
        internal void OnGUILayout()
        {
            bool isVisible = IsVisible();

            foreach (var drawer in layoutDrawers)
            {
                drawer.OnGUILayout();
            }

            if (isVisible)
            {
                foreach (var drawer in decoratorDrawers)
                {
                    drawer.OnGUILayout();
                }

                foreach (var drawer in verificationDrawers)
                {
                    drawer.OnGUILayout();
                }

                foreach (var drawer in propertyControlDrawers)
                {
                    drawer.OnStartGUILayout();
                }

                string label = GetFieldLabel();
                if (!string.IsNullOrEmpty(label))
                {
                    label = UnityEditor.ObjectNames.NicifyVariableName(label);
                }
                if (propertyDrawers.Count == 0)
                {
                    if (typeDrawer != null)
                    {
                        typeDrawer.OnGUILayout(label);
                    }
                    else if (drawerObject != null)
                    {
                        if (!IsArrayElement)
                        {
                            UnityEditor.EditorGUILayout.LabelField(label);
                            UnityEditor.EditorGUI.indentLevel++;
                            {
                                drawerObject.OnGUILayout();
                            }
                            UnityEditor.EditorGUI.indentLevel--;
                        }
                        else
                        {
                            UnityEditor.EditorGUILayout.BeginHorizontal();
                            {
                                UnityEditor.EditorGUILayout.LabelField(label, UnityEngine.GUILayout.Width(25));
                                UnityEditor.EditorGUILayout.BeginVertical();
                                {
                                    drawerObject.OnGUILayout();
                                }
                                UnityEditor.EditorGUILayout.EndVertical();
                            }
                            UnityEditor.EditorGUILayout.EndHorizontal();
                        }
                    }
                    else if (drawerObject == null)
                    {
                        if (!NativeDrawerUtility.IsTypeSupported(ValueType))
                        {
                            EGUI.BeginGUIColor(UnityEngine.Color.red);
                            {
                                UnityEditor.EditorGUILayout.LabelField(string.IsNullOrEmpty(label) ? "" : label, $"The type isn't supported.type = {ValueType}");
                            }
                            EGUI.EndGUIColor();
                        }
                        else if (Value == null)
                        {
                            UnityEditor.EditorGUILayout.BeginHorizontal();
                            {
                                UnityEditor.EditorGUILayout.PrefixLabel(label);
                                if (UnityEngine.GUILayout.Button("Create"))
                                {
                                    Value = NativeDrawerUtility.CreateDefaultInstance(ValueType);
                                    InitDrawer();
                                }
                            }
                            UnityEditor.EditorGUILayout.EndHorizontal();
                        }
                        else
                        {
                            EGUI.BeginGUIColor(UnityEngine.Color.red);
                            {
                                UnityEditor.EditorGUILayout.LabelField(string.IsNullOrEmpty(label) ? "" : label, "Unknown Drawer");
                            }
                            EGUI.EndGUIColor();
                        }
                    }
                }
                else
                {
                    foreach (var drawer in propertyDrawers)
                    {
                        drawer.OnGUILayout(label);
                    }
                }

                foreach (var drawer in propertyControlDrawers)
                {
                    drawer.OnEndGUILayout();
                }
            }
        }