void OnApplyChanges()
    {
        sceneDataUpdatePayload.name            = view.GetName();
        sceneDataUpdatePayload.description     = view.GetDescription();
        sceneDataUpdatePayload.allowVoiceChat  = view.GetAllowVoiceChat();
        sceneDataUpdatePayload.isMatureContent = view.GetMatureContent();

        string[] permissions = null;
        if (view.GetAllowMovePlayer() && view.GetAllowTriggerEmotes())
        {
            permissions = new [] { PERMISSION_MOVE_PLAYER, PERMISSION_TRIGGER_EMOTES };
        }
        else if (view.GetAllowMovePlayer())
        {
            permissions = new [] { PERMISSION_MOVE_PLAYER };
        }
        else if (view.GetAllowTriggerEmotes())
        {
            permissions = new [] { PERMISSION_TRIGGER_EMOTES };
        }
        sceneDataUpdatePayload.requiredPermissions = permissions;
        OnRequestUpdateSceneData?.Invoke(sceneData.id, sceneDataUpdatePayload);
    }
示例#2
0
 private void OnUpdateSceneDataRequested(string id, SceneDataUpdatePayload payload)
 {
     OnRequestUpdateSceneData?.Invoke(id, payload);
 }