Hello,
(What I am doing)
What I am doing is I have a button prefab in a scrollable panel. The button and its text is loaded through WWW, as well as instantiating more prefabs for each button needed.
When a user clicks on one, it should use an IEnumerator to load the story associated with that title and then open a new panel with the story loaded. So what I was thinking was attaching a C# script to the panel holding the button prefabs and when a button is clicked, it will load the story associated with that button ID via WWW.
(The Problem)
My question is how the buttons know which story to load? My idea was to attach and use the prefab’s C# script to hold the story ID and when it’s clicked: the main script can ask that C# script what ID it was. How do I do that though, and also change the script’s ID for every new button i instantiate?
i have to check if the player is still in the collider of many objects, i cannot check if every one is active or not. i'm making a system that detect if the player is in a light zone( a collider on a certain layer) some of the object that contain the collider turn off some time then turn on... i find a way to achieve that with the overlap sphere but it cause me an other problem...
– jeffbori