コード例 #1
0
 private void OnEnable()
 {
     self = target as BulletPool;
     if (self == null)
     {
         return;
     }
     bullets          = self.BulletsToString();
     inheritedBullets = self.InheritedBulletsToString();
 }
コード例 #2
0
        public override void OnInspectorGUI()
        {
            base.OnInspectorGUI();

            if (GUILayout.Button(new GUIContent("Detect", "Detect bullets in the folder.")))
            {
                self.Detect();
                bullets          = self.BulletsToString();
                inheritedBullets = self.InheritedBulletsToString();
            }

            if (bullets != "")
            {
                EditorGUILayout.LabelField("Bullets in this pool");
                EditorGUILayout.HelpBox(bullets, MessageType.Info);
            }

            if (inheritedBullets != "")
            {
                EditorGUILayout.LabelField("Inherited bullets in this pool");
                EditorGUILayout.HelpBox(inheritedBullets, MessageType.Info);
            }
        }