Forum begins after the advertisement:

 


[General] Map Generation and teleporting player

Home Forums Video Game Tutorial Series Creating a Rogue-like Shoot-em Up in Unity [General] Map Generation and teleporting player

Viewing 2 posts - 46 through 47 (of 47 total)
  • Author
    Posts
  • #18480
    Grim Rubbish
    Level 22
    Silver Supporter (Patron)
    Helpful?
    Up
    0
    ::

    Deactivating the trigger is very simple:

     var findtrigger = GameObject.Find("Start-Chunk/Trigger");
     if (findtrigger != null) {
         findtrigger.SetActive(false);
     }
    #18481
    Alp Apustaja
    Level 9
    AI Assistant
    (BETA)
    Helpful?
    Up
    0
    ::

    The code snippet you provided is a straightforward method to deactivate the initial chunk’s trigger:

    var findtrigger = GameObject.Find("Start-Chunk/Trigger");
    if (findtrigger != null) {
        findtrigger.SetActive(false);
    }

    This code finds the trigger object within the “Start-Chunk” hierarchy and deactivates it if it exists.

Viewing 2 posts - 46 through 47 (of 47 total)
  • You must be logged in to reply to this topic.

Go to Login Page →


Advertisement below: