Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

UI Scrollview Add Item Current Scene to Another Scene of ScrollView

Discussion in 'Scripting' started by Ejaay, Aug 26, 2019.

  1. Ejaay

    Ejaay

    Joined:
    Aug 21, 2019
    Posts:
    13
    Need Help



    My button Function puts an ITEM to my ScrollView in the Current Scene. I wanted the Items Visible to an another Scene of ScrollView when i click on the Button.

    Example. (Scene 1) on my Canvass has "Button" and "ScrollView" clicking the Button adds item on the "ScrollView" then (Scene 2) has Canvass with "ScrollView"

    How do i make my Items on the Scene 1 Visible on the Scene2.


    Hope someone can help.
     
  2. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    1,492
    You can't modify the content of a scene that isn't currently loaded, so you'll need to "remember" the thing you want to add until the scene is loaded and then add it.

    Break that down into steps. You need to notice that the user clicked a button, then remember some information across a scene transition, and then add the appropriate item to your scrollview in the new scene. You can probably find tutorials for each of those individual steps if you don't know how to do them.
     
    Ejaay likes this.
  3. Ejaay

    Ejaay

    Joined:
    Aug 21, 2019
    Posts:
    13



    Do you have a specific Tutorial for that sir Antistone. I deeply appreciate if you can provide a link to it. And thank you for the response
     
  4. Antistone

    Antistone

    Joined:
    Feb 22, 2014
    Posts:
    1,492
    I do not.