Thursday, March 26, 2020

Mr Taft FAQ 1 - Signal

This is the first in a series of FAQ articles to accompany the Zelda Like Tutorial Series from Mr. Taft. This question comes up a lot on the Discord Server.

The Question:

Hey guys - I've come to a complete standstill when implementing Signals in this Zelda for Unity project. My code for Signal & SignalListener are exactly as they should be with no errors, but I can't seem to drag my "Signal" over to my Signallistener. Any ideas why? Using unity 2019.1"

Or.

"im doing the signal system but seems like it doesnt recognize the object as an scriptable object, what can cause this?"


The Answer:

Unity 2019 already has a Signal, your one and the Unity one are being confused with each other. There are two fixes.

1. Don't use Signal as the name of your scritpable object, use Notification or TaftSignal for example instead!

2. You can create an object called signal but place it in a folder in the asset menu, that way Unity will treat it as a separate entity. 

in the Signal.cs file modify the CreateAssetMenu directive to read as follows.


When you want to create a signal as directed by Mr Taft, be sure to select the signal from your Scriptable folder!



Happy coding! :D

PappaP x

No comments:

Post a Comment

ASP.NET Core(porate) , yup I'm hilarious :|

 So, lately, I have been in full corporate mode. That means looking after my team of engineers and when I have some gaps in my calendar work...

Most Viewed