- Home /
[Error] RPC function undefined in IRRELEVANT file?
I'm making a Turn-Based Strategy with units, and am working on my first unit's first active ability. The game is 1v1 online, so I use RPC's to keep the two clients "identical"
The ability I am working on is supposed to do one thing in the unit's OWNER's client, and another in the NON-OWNER's client.
Here is the simple code -- the RPC functions just debug.log right now to show they work. nView is the NetworkView attached to the same gameobject that this script is attached to
MY PROBLEM:
This code is in the script only attached to units of type A (unitAScript)
When testing, each player has a unit of type B, and one player owns a unit of type A
I test by casting the ability ON unit A, so that the caller of the ability and the target are both that unit A
For the client of the player that does NOT own the unit A, I get an error saying that unit B's script does not have a definition for the RPC function??????
Why does it matter that the RPC function is only defined in unitAScript? I only WANT it defined there because the abilities will be different for each unit..
Thanks for your help
Your answer
Follow this Question
Related Questions
NetworkIdentity Disabling GameObjects 1 Answer
SyncVar issue 0 Answers
How To Deal With Lingering Prefabs in Multiplayer Scene ? 0 Answers
Networking GameManager/GameState Sync 1 Answer
How to use an RPC to send an animation over the network? 2 Answers