Closed
Description
Fantastic project, thankyou!
Quick note to add to the docs:
When using Signals for mobile and/or using agressive code stripping, Signals will be removed from builds because they aren't statically referenced/linked. You'll want to add a Preserve attribute like this:
using Supyrb;
using UnityEngine.Scripting;
namespace MyNameSpace
{
[Preserve] //important - must use this attribute if using aggressive stripping on mobile, otherwise this signal won't be found and will throw an error
public class Signal_MySignal : Signal<bool>
{
// Override invoke to make sure that the derived signal class shows up in the stacktrace
protected override void Invoke(int index)
{
base.Invoke(index);
}
}
}
Metadata
Metadata
Assignees
Labels
No labels