Legacy Documentation: Version 5.1
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

NetworkIdentity.hasAuthority

Switch to Manual
public var hasAuthority: bool;

Description

This returns true if this object is the authoritative version of the object in the distributed network application.

This value is determined at runtime, as opposed to LocalPlayerAuthority which is set on the prefab. For most objects, authority is held by the server / host. For objects with LocalPlayerAuthority set, authority is held by the client of that player.