Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Help in Logic

Discussion in 'Scripting' started by VeTK85, Apr 19, 2019.

  1. VeTK85

    VeTK85

    Joined:
    Jun 26, 2016
    Posts:
    54
    help in logic
    I would like to know if you can loop the onclick by sending and removing functions like an setactive.

    I have 1 menu with 3 player
    and 3 customization functions for each player.

    When choosing Player 2 from the menu, it sends the functions that are in the functionscustom 2 to the onclicks.

    I intend to use only 1 canvas as shown in the image

     
    Last edited: Apr 19, 2019
  2. eses

    eses

    Joined:
    Feb 26, 2013
    Posts:
    2,637
    Hi @fabiorangel

    "is it possible to do that?"

    Your explanation is really vague, so I didn't quite understand how you have setup your character selection.

    If you now have one canvas for each character, and then show one at time, you could as well have one RectTransform and other stuff for each character. Then just disable character's parent RT when it is not shown.

    Then again, you might not want to have menu related 3d meshes parented under canvas or any of it's child objects (if you are working with 3D content, you didn't say it...). In this case, you could just have a reference to each character's menu models, and when certain panel is activated in code, it will also enable it's 3d model that is located in scene in front of camera...
     
  3. VeTK85

    VeTK85

    Joined:
    Jun 26, 2016
    Posts:
    54
    Sorry to see if you can understand now