public static UpdateClientValue Send(string InNewvalue, string InValueName, string InMonoBehaviourName,
                                         GameObject InObject)
    {
        UpdateClientValue msg = new UpdateClientValue()
        {
            Newvalue          = InNewvalue,
            ValueName         = InValueName,
            MonoBehaviourName = InMonoBehaviourName,
            GameObject        = InObject.NetId()
        };

        msg.SendToAll();
        return(msg);
    }
Пример #2
0
    public static UpdateClientValue Send(string InNewvalue, string InValueName, string InMonoBehaviourName,
                                         GameObject InObject)
    {
        uint netID = NetId.Empty;

        if (InObject != null)
        {
            netID = InObject.NetId();
        }
        UpdateClientValue msg = new UpdateClientValue()
        {
            Newvalue          = InNewvalue,
            ValueName         = InValueName,
            MonoBehaviourName = InMonoBehaviourName,
            GameObject        = netID
        };

        msg.SendToAll();
        return(msg);
    }
Пример #3
0
 public static void RequestChangeVariable(ulong PageID, string ChangeTo, bool SendToClient, GameObject WhoBy, string AdminId)
 {
     if (Librarian.IDToPage.ContainsKey(PageID))
     {
         UIManager.Instance.adminChatWindows.adminToAdminChat.ServerAddChatRecord(
             WhoBy.name + " Modified " + Librarian.IDToPage[PageID].VariableName + " on " + Librarian.IDToPage[PageID].BindedTo.Title
             + " From " + VVUIElementHandler.Serialise(Librarian.IDToPage[PageID].Variable, Librarian.IDToPage[PageID].VariableType) + " to " + ChangeTo
             + " with Send to clients? " + SendToClient, AdminId);
         Librarian.PageSetValue(Librarian.IDToPage[PageID], ChangeTo);
         if (SendToClient)
         {
             var monoBehaviour = (Librarian.IDToPage[PageID].BindedTo.BookClass as Component);
             UpdateClientValue.Send(ChangeTo, Librarian.IDToPage[PageID].VariableName,
                                    TypeDescriptor.GetClassName(monoBehaviour),
                                    monoBehaviour.gameObject);
         }
     }
     else
     {
         Logger.LogError("Page ID has not been generated Page ID > " + PageID, Category.VariableViewer);
     }
 }