public static bool HasAuthority(this GameObject obj, uint componentId)
        {
            var authority = obj.GetAuthority(componentId);

            return(authority == Authority.Authoritative || authority == Authority.AuthorityLossImminent);
        }
 /// <summary>
 ///     Returns the authority state of the GameObject over the specified component.
 /// </summary>
 /// <exception cref="InvalidOperationException">
 ///     If the GameObject is not a SpatialOS entity, or the authority for this entity could not be accessed.
 /// </exception>
 public static Authority GetAuthority <T>(this GameObject obj) where T : IComponentMetaclass
 {
     return(obj.GetAuthority(Dynamic.GetComponentId <T>()));
 }
        public static bool HasAuthority <T>(this GameObject obj) where T : IComponentMetaclass
        {
            var authority = obj.GetAuthority <T>();

            return(authority == Authority.Authoritative || authority == Authority.AuthorityLossImminent);
        }