Skip to content

Commit 302bbf4

Browse files
committed
Force all clickable buttons/switches to layer 20
1 parent db01991 commit 302bbf4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

RasterPropMonitor/Core/ButtonHandler.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,12 @@ public static void CreateButton(InternalProp thatProp, string buttonName, int nu
220220

221221
public static void CreateButton(InternalProp thatProp, string buttonName, Action handlerFunction, Action releaseHandlerFunction = null, InternalModel thatModel = null)
222222
{
223-
SmarterButton buttonBehaviour;
224-
if ((buttonBehaviour = AttachBehaviour(thatProp, thatModel, buttonName)) == null)
223+
SmarterButton buttonBehaviour = AttachBehaviour(thatProp, thatModel, buttonName);
224+
if (buttonBehaviour == null)
225225
{
226226
return;
227227
}
228+
buttonBehaviour.gameObject.layer = 20; // everything clickable needs to be on layer 20 because FreeIva disables mouse interaction with layer 16.
228229
buttonBehaviour.clickHandlers.Add(handlerFunction);
229230
if (releaseHandlerFunction != null)
230231
{

0 commit comments

Comments
 (0)