Example #1
0
 public override void OnPreTargetMembersGUI()
 {
     for (int i = 0; i < Targets.Length; ++i)
     {
         var root = Targets[i] as RestoredAssetsRoot;
         InspectorGUI.ToolArrayGUI(this,
                                   m_assets[i],
                                   $"[{m_assets[ i ].Length}] {root.Type.ToString().SplitCamelCase()} assets");
     }
 }
Example #2
0
        public override void OnPostTargetMembersGUI()
        {
            if (IsMultiSelect)
            {
                return;
            }

            InspectorGUI.ToolArrayGUI(this, RigidBody.GetComponentsInChildren <Shape>(), "Shapes");

            InspectorGUI.ToolArrayGUI(this, m_constraints.ToArray(), "Constraints");
        }
Example #3
0
        public static void OnObjectListsGUI(CustomTargetTool context)
        {
            if (context == null)
            {
                return;
            }

            InspectorGUI.ToolArrayGUI(context,
                                      context.CollectComponentsInChildred <RigidBody>().ToArray(),
                                      "Rigid Bodies");

            InspectorGUI.ToolArrayGUI(context,
                                      context.CollectComponentsInChildred <Constraint>().ToArray(),
                                      "Constraints");

            InspectorGUI.ToolArrayGUI(context,
                                      context.CollectComponentsInChildred <Shape>().ToArray(),
                                      "Shapes");
        }
Example #4
0
        public override void OnPostTargetMembersGUI()
        {
            if (NumTargets > 1)
            {
                return;
            }

            InspectorGUI.ToolListGUI(this,
                                     Belt.Rollers,
                                     "Rollers",
                                     wheel => Belt.Add(wheel),
                                     wheel => Belt.Remove(wheel),
                                     OnRollerGUI);

            using (new GUI.EnabledBlock(false))
                InspectorGUI.ToolArrayGUI(this,
                                          Belt.Tracks,
                                          "Tracks");
        }
 public override void OnPostTargetMembersGUI()
 {
     if (Targets.Length == 1)
     {
         InspectorGUI.ToolArrayGUI(this, ArticulatedRoot.RigidBodies, "Rigid Bodies");
     }
     else
     {
         for (int i = 0; i < NumTargets; ++i)
         {
             var articulatedRoot = Targets[i] as ArticulatedRoot;
             InspectorGUI.ToolArrayGUI(this,
                                       articulatedRoot.RigidBodies,
                                       $"{GUI.AddColorTag( articulatedRoot.name, InspectorGUISkin.BrandColor )}: Rigid Bodies");
             if (i < NumTargets - 1)
             {
                 InspectorGUI.Separator();
             }
         }
     }
 }