|
Post by duotemplar on Jul 18, 2016 12:28:18 GMT
I follow the doc, add an custom event in the MasterAudio Object.Then I add Event Sounds to another gameobject.Then I choose Custom Event.Because, according the doc, if I want fire the custom event, I should use this script and chosen then event I created.Then choose "Fire".But when I chose Custom Event Control, there is no "Fire" command, only an Error "Custom Recievers can not fire events....". So if I define a custom event, I know how to respond, but how can I fire it without coding?
|
|
|
Post by DarkTonic Dev on Jul 18, 2016 19:13:27 GMT
You did everything right except for the first step. When you choose "event to activate" it needs to be any other event besides "Custom Event" and then you can choose the "Fire" command. For example, activate the "Visible" event and do the other steps you listed. The custom events will appear in a dropdown when you pick Custom Event Control, Fire command.
And the custom event will be fired when the game object becomes visible.
You can also fire a custom event from the Inspector where you create them. At runtime there's a "Fire!" button next to each.
|
|
|
Post by duotemplar on Jul 20, 2016 11:16:17 GMT
Yes,I found my problem, and it works right now! thanks
|
|
|
Post by DarkTonic Dev on Jul 20, 2016 15:30:00 GMT
No problem.
|
|