2D-Light-of-Sight-Unity
2D-Light-of-Sight-Unity copied to clipboard
Demo's is empty.
Hi,
Thank you for this awesome plugin, it's really amazing and helpful.
I'm trying to create an event system for hiding/showing some object when they are in the light distance, but I've didn't figure out how the event system work, could you please point me to the right direction of how to use it.
Sorry I've got away from my issue title, I've opened the demo's and they are empty, there is no object in the Hierarchy (for all scenes). I really appreciated if you can help me with this.
Thank you again for this plugin.
Mumen
Hi, may I ask what's your Unity version? As I upgraded the project to Unity 5, so the scenes may be empty in Unity 4.x.
For event system, event source is the one that actively sense the event triggers. When a trigger is sensed by a source, the source and trigger will issue the related events.
For example, in the Full Screen Light demo, the player object is attached with an event source component, while the text labels are attached with an event trigger component. When the player "sees" the label objects, events are issued, and in this case, ChangeColorOnLOSEvent's function is called.
Hope it helps :)
Hi,
Thank you for your reply and for the clarification of how the event system works. My Unity version is 5.0.0f4
By the way, I've tried the event system and I've an issue with it, in file LOSEventSource.cs, line 75
Physics.Raycast(_trans.position, direction, out hit, distance, mask)
always return false, so the event would not triggered, do you have any idea why?
Thanks again :)