void OnGUI()
 {
     type = (VRCSDK2.VRCPlayerModFactory.PlayerModType)EditorGUILayout.EnumPopup("Mods", type);
     if (GUILayout.Button("Add Mod"))
     {
         VRCSDK2.VRCPlayerMod mod = VRCSDK2.VRCPlayerModFactory.Create(type);
         myTarget.AddMod(mod);
         addModCallback();
     }
 }
예제 #2
0
 public void RemoveMod(VRCPlayerMod mod)
 {
     foreach (VRCPlayerMod playerMod in playerMods)
     {
         if (playerMod.name == mod.name)
         {
             playerMods.Remove(playerMod);
             break;
         }
     }
 }
예제 #3
0
        public void AddMod(VRCPlayerMod mod)
        {
            bool flag = false;

            foreach (VRCPlayerMod playerMod in playerMods)
            {
                if (playerMod.Equals(mod))
                {
                    flag = true;
                }
            }
            if (!flag)
            {
                playerMods.Add(mod);
            }
        }