示例#1
0
        public override void OnInspectorGUI()
        {
            XBaseEditor.DrawLogo();
            base.OnInspectorGUI();
            XMonoBehaviourEditor.ShowXAttributeMember(target);

            var networkBehaviour = target as NetworkBehaviour;

            XBaseWindow.CreateCheckBox("isServer", networkBehaviour.isServer);
            XBaseWindow.CreateCheckBox("isClient", networkBehaviour.isClient);
            XBaseWindow.CreateCheckBox("isLocalPlayer", networkBehaviour.isLocalPlayer);
            XBaseWindow.CreateIntField("netId", (int)networkBehaviour.netId.Value);
            XBaseWindow.CreateIntField("playerControllerId", (int)networkBehaviour.playerControllerId);
        }
示例#2
0
 public override void OnInspectorGUI()
 {
     if (isVisible)
     {
         XBaseEditor.DrawLogo();
         base.OnInspectorGUI();
         material.renderQueue = XBaseWindow.CreateIntField("renderQueue", material.renderQueue);
         toggleKeywords       = XBaseWindow.CreateCheckBox("shaderKeywords : " + material.shaderKeywords.Length, toggleKeywords);
         if (toggleKeywords)
         {
             for (int i = 0; i < material.shaderKeywords.Length; i++)
             {
                 material.shaderKeywords [i] = XBaseWindow.CreateStringField(material.shaderKeywords [i]);
             }
         }
         if (material.HasProperty("_Color"))
         {
             material.color = XBaseWindow.CreateColorField("_Color", material.color);
         }
     }
 }