Your comments

I have the new scene, do i just need to upload the scene or the entire project again?

Hello,


I Am now uploading the file, you need p210010_Factory as the scene.

As you can see the transportsurfaces are a child of the main gameobject, not of the Lift/Rotator, so that shouldn't be a problem right?

Ah I understand now, thank you so much!

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?

We are trying to get the Word option to work as well, we have changed the code to the following: 

Only thing we are not sure about is the line with accessor.Write(posheader, (byte) 10). 

Is this correct or should we change it?

Sorry for the formatting, couldn't find the code button.

if (signal.OriginDataType.ToUpper() == "BYTE")

{

if (signal.GetType() == typeof(PLCInputInt) || signal.GetType() == typeof(PLCOutputInt))

{

if (lastbit)

posmemory = posmemory + 1;

bit = 0;

shm.bit = 0;

lastbit = false;

signal.Comment = $"M{posmemory}";

accessor.Write(posheader, (byte) 8);

shm.type = SIGNALTYPE.BYTE;

posmemory = posmemory + 1;

}

}

else if (signal.OriginDataType.ToUpper() == "WORD")

{

if (signal.GetType() == typeof(PLCInputInt) || signal.GetType() == typeof(PLCOutputInt))

{

if (lastbit)

posmemory = posmemory + 1;

bit = 0;

shm.bit = 0;

lastbit = false;

signal.Comment = $"M{posmemory}";

accessor.Write(posheader, (byte) 10);

shm.type = SIGNALTYPE.WORD;

posmemory = posmemory + 2;

}

}

else

{ if (signal.GetType() == typeof(PLCInputInt) || signal.GetType() == typeof(PLCOutputInt))

{

if (lastbit)

posmemory = posmemory + 1;

bit = 0;

shm.bit = 0;

lastbit = false;

signal.Comment = $"M{posmemory}";

accessor.Write(posheader, (byte) 10);

shm.type = SIGNALTYPE.INT;

posmemory = posmemory + 4;

}

}

if (PlaceLoadOnMUSensor == null)

{

if (!NoPhysicsWhenPlaced)

rb.isKinematic = true;

else

rb.isKinematic = false;

}

This fixed it!

This feels like it is inverted as well. As NoPhysicsWhenPlaced is true, it shouldnt have phisics so rb.isKinematic should be false. Now rb.isKinematic does not change when NoPhisicsWhenPlaced is true.