I'm working on a multiplayer game, based on the multiplayer examples... Code (csharp): @RPC function LoadLevel (level : String, levelPrefix : int) { Debug.Log("Loading level " + level + " with prefix " + levelPrefix); lastLevelPrefix = levelPrefix; // There is no reason to send any more data over the network on the default channel, // because we are about to load the level, thus all those objects will get deleted anyway Network.SetSendingEnabled(0, false); // We need to stop receiving because first the level must be loaded. // Once the level is loaded, RPC's and other state update attached to objects in the level are allowed to fire Network.isMessageQueueRunning = false; // All network views loaded from a level will get a prefix into their NetworkViewID. // This will prevent old updates from clients leaking into a newly created scene. Network.SetLevelPrefix(levelPrefix); Application.LoadLevel(level); yield; yield; // Allow receiving data again Network.isMessageQueueRunning = true; // Now the level has been loaded and we can start sending out data Network.SetSendingEnabled(0, true); // Notify our objects that the level and the network is ready for (var go in FindObjectsOfType(GameObject)) go.SendMessage("OnNetworkLoadedLevel", SendMessageOptions.DontRequireReceiver); } I keep getting an error at "go.SendMessage("OnNetworkLoadedLevel", SendMessageOptions.DontRequireReceiver); ": I'm getting this error, in any other scripts that use that line of code. I'm completely confused as to what is going on! Any help???
did you add all components? OnNetworkLevelLoaded is a function that is on one of the components that come with the example actually.
Huh. It appeared to be effecting my player spawn, but it was something entirely different. Still, it is a little disconcerting to get an error like this, and I hope it doesn't cause errors... Anyways, it turns out to be low priority, but still... Huh. @Dreamora I'm not exactly sure what you mean, could you elaborate?