mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Fix ?? (#854)
* Fix ?? ?? doesn't work on unitys objects * Update NetworkBehaviour.cs
This commit is contained in:
parent
f618e17366
commit
e22f527eef
@ -39,7 +39,10 @@ public NetworkIdentity netIdentity
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
netIdentityCache = netIdentityCache ?? GetComponent<NetworkIdentity>();
|
if (netIdentityCache == null)
|
||||||
|
{
|
||||||
|
netIdentityCache = GetComponent<NetworkIdentity>()
|
||||||
|
}
|
||||||
if (netIdentityCache == null)
|
if (netIdentityCache == null)
|
||||||
{
|
{
|
||||||
Debug.LogError("There is no NetworkIdentity on " + name + ". Please add one.");
|
Debug.LogError("There is no NetworkIdentity on " + name + ". Please add one.");
|
||||||
|
Loading…
Reference in New Issue
Block a user