private void SpawnThenParent(SiraPrefabContainer.Pool bombModelPool)
 {
     container  = bombModelPool.Spawn();
     activeNote = container.Prefab;
     bombPool   = bombModelPool;
     if (_pluginConfig.HMDOnly == true || LayerUtils.HMDOverride == true)
     {
         LayerUtils.SetLayer(activeNote, LayerUtils.NoteLayer.FirstPerson);
     }
     else
     {
         LayerUtils.SetLayer(activeNote, LayerUtils.NoteLayer.Note);
     }
     ParentNote(activeNote);
 }
Пример #2
0
 private GameObject DuplicateIfExists(GameObject gameObject, int layer)
 {
     if (gameObject.activeInHierarchy)
     {
         GameObject tempObject = Instantiate(gameObject);
         tempObject.transform.parent        = gameObject.transform.parent;
         tempObject.transform.localScale    = gameObject.transform.localScale;
         tempObject.transform.localPosition = gameObject.transform.localPosition;
         LayerUtils.SetLayer(tempObject, layer);
         duplicatedArrows.Add(tempObject);
         return(tempObject);
     }
     else
     {
         return(null);
     }
 }