Author Topic: How to control objects already present in scene (RFC calls say not yet created)  (Read 3237 times)

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Error : "[TNet] Trying to execute a function '" + funcName + "' on TNObject #" + objID + " before it has been created."

I've a Character object prefab. I have four in my test level, added in the Editor. These are copied as prefabs into Resources as Player1, 2, 3 and 4. I have manually set their TNObject ID numbers to 1,2,3,4 respectively. I have also added them to the list of objects in TNManager in the starting scene (the TNet example Menu I use to launch my scene currently). In these objects scripts is an RFC, and when it's called, TNet warns that I'm trying to execute the RFC before the objects numbered 1-4 have been created.

In the scene when running, I have present TNManager with the four prefabs listed in Objects; Player1, 2, 3 & 4 GameObjects in the scene; and each of these with TNObject set to 1,2,3,4 respectively.

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Fixed. The TNObject script was disabled on the prefabs.