0
Answered

Coupled IO Disappearing when starting game

Bo Adam 5 months ago in General Questions updated by Support 5 months ago 5

Hello,

I am adding IO Using a small attachment to the provided game4automation Scripts (for example in Drive_Simple). 

For the drive simple example I use this code: 

Image 623


For my own scripts this works, but not for the provided game4automation scripts. I need to add IO using these functions because we have a lot of IO (+-5000). 

When I start the game, the IO is removed from the script (also in the inspector). Is there a way to fix this?

Answer

Answer
Answered

Hi, I think you must Use  EditorUtility.SetDirty function.

Please also check page https://realvirtual.io/documentation/current/signalmanager.html and the example script on the page.

Answer
Answered

Hi, I think you must Use  EditorUtility.SetDirty function.

Please also check page https://realvirtual.io/documentation/current/signalmanager.html and the example script on the page.

I've added the Line with my cursor on it, didn't work. What should i fill in where in the example "Component" is used? And can i find the syntax for the Setdirty function somewhere?

The Unity editor is not recognizing your changes which you are doing in the script. You should use the function sin your code with your adding functions. There you should use EditorUtility.SetDirty(this)

You need to SetDirty the component script. It seems that you set dirty in the script above the value Forward instead of the component itself.

Ah I understand now, thank you so much!