< Summary

Class:DCL.Interface.WebInterface
Assembly:WebInterface
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WebInterface/Interface.cs
Covered lines:258
Uncovered lines:227
Coverable lines:485
Total lines:1930
Line coverage:53.1% (258 of 485)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
WebInterface()0%110100%
SceneReady(...)0%110100%
ActivateRenderingACK()0%2100%
DeactivateRenderingACK()0%2100%
OnGlobalPointerEvent()0%110100%
StoreSceneStateEvent()0%110100%
OnTextInputChangeTextEventPayload()0%110100%
operator+(...)0%2100%
OnMetricsUpdate()0%110100%
TransformPayload()0%2100%
SystemInfoReportPayload()0%2100%
JumpInPayload()0%110100%
Property(...)0%2100%
HeadersPayload()0%110100%
AvatarOnClickPayload()0%110100%
StartDecentraland()0%2100%
CheckURLParam(...)0%2100%
GetURLParam(...)0%2100%
MessageFromEngine(...)0%5.155081.82%
ProcessQueuedMessages()0%330100%
GetGraphicCard()0%110100%
SendMessage(...)0%110100%
SendMessage[T](...)0%110100%
SendJson(...)0%2.062075%
SendSceneEvent[T](...)0%110100%
SendAllScenesEvent[T](...)0%110100%
ReportPosition(...)0%110100%
ReportCameraChanged(...)0%110100%
ReportCameraChanged(...)0%220100%
Web3UseResponse(...)0%2100%
ReportIdleStateChanged(...)0%110100%
ReportControlEvent[T](...)0%110100%
SendRequestHeadersForUrl(...)0%6200%
BuilderInWorldMessage(...)0%2100%
ReportOnClickEvent(...)0%2.032080%
ReportRaycastResult[T, P](...)0%2100%
ReportRaycastHitFirstResult(...)0%2100%
ReportRaycastHitAllResult(...)0%2100%
CreateHitObject(...)0%110100%
SetPointerEventPayload(...)0%220100%
ReportGlobalPointerDownEvent(...)0%110100%
ReportGlobalPointerUpEvent(...)0%110100%
ReportOnPointerDownEvent(...)0%2.012085.71%
ReportOnPointerUpEvent(...)0%2.012085.71%
ReportOnTextSubmitEvent(...)0%2.022083.33%
ReportOnTextInputChangedEvent(...)0%3.192033.33%
ReportOnTextInputChangedTextEvent(...)0%220100%
ReportOnFocusEvent(...)0%2.862040%
ReportOnBlurEvent(...)0%2.862040%
ReportOnScrollChange(...)0%220100%
ReportEvent[T](...)0%2100%
ReportOnMetricsUpdate(...)0%110100%
ReportOnEnterEvent(...)0%6200%
LogOut()0%2100%
RedirectToSignUp()0%2100%
PreloadFinished(...)0%2100%
ReportMousePosition(...)0%2100%
SendScreenshot(...)0%2100%
SetDelightedSurveyEnabled(...)0%2100%
SetScenesLoadRadius(...)0%110100%
SendSaveUserDescriptionPayload(...)0%2100%
RequestOwnProfileUpdate()0%110100%
SendSaveAvatar(...)0%110100%
SendAuthentication(...)0%2100%
SendPassport(...)0%110100%
SendSaveUserUnverifiedName(...)0%2100%
SendSaveUserDescription(...)0%2100%
SendRequestUserProfile(...)0%2100%
SendUserAcceptedCollectibles(...)0%110100%
SaveUserTutorialStep(...)0%2100%
SendPerformanceReport(...)0%2100%
SendSystemInfoReport()0%2100%
SendTermsOfServiceResponse(...)0%110100%
OpenURL(...)0%110100%
PublishStatefulScene(...)0%2100%
SendReportScene(...)0%110100%
SetHomeScene(...)0%2100%
SendReportPlayer(...)0%110100%
SendBlockPlayer(...)0%110100%
SendUnblockPlayer(...)0%2100%
RequestScenesInfoAroundParcel(...)0%110100%
SendAudioStreamEvent(...)0%110100%
JoinVoiceChat()0%110100%
LeaveVoiceChat()0%110100%
SendSetVoiceChatRecording(...)0%2100%
ToggleVoiceChatRecording()0%2100%
ApplySettings(...)0%110100%
RequestGIFProcessor(...)0%2100%
DeleteGIF(...)0%2100%
GoTo(...)0%2100%
GoToCrowd()0%2100%
GoToMagic()0%2100%
LoadingHUDReadyForTeleport(...)0%2100%
JumpIn(...)0%2100%
JumpInHome(...)0%2100%
SendChatMessage(...)0%2100%
UpdateFriendshipStatus(...)0%2100%
ScenesLoadingFeedback(...)0%2100%
FetchHotScenes()0%2100%
SetBaseResolution(...)0%110100%
ReportAnalyticsEvent(...)0%2100%
ReportAnalyticsEvent(...)0%2100%
FetchBalanceOfMANA()0%110100%
SendSceneExternalActionEvent(...)0%2100%
SetMuteUsers(...)0%110100%
SendCloseUserAvatar(...)0%2100%
KillPortableExperience(...)0%2100%
RequestThirdPartyWearables(...)0%110100%
SetDisabledPortableExperiences(...)0%110100%
RequestWearables(...)0%2100%
RequestEmotes(...)0%2100%
SearchENSOwner(...)0%110100%
RequestHomeCoordinates()0%2100%
RequestUserProfile(...)0%2100%
ReportAvatarFatalError(...)0%2100%
UnpublishScene(...)0%2100%
NotifyStatusThroughChat(...)0%2100%
ReportVideoProgressEvent(...)0%330100%
ReportAvatarRemoved(...)0%2100%
ReportAvatarSceneChanged(...)0%2100%
ReportAvatarClick(...)0%2100%
ReportOnPointerHoverEnterEvent(...)0%110100%
ReportOnPointerHoverExitEvent(...)0%110100%
ReportTime(...)0%110100%
GetFriendsWithDirectMessages(...)0%2100%
MarkMessagesAsSeen(...)0%2100%
GetPrivateMessages(...)0%2100%
MarkChannelMessagesAsSeen(...)0%2100%
GetUnseenMessagesByUser()0%2100%
GetUnseenMessagesByChannel()0%2100%
GetFriends(...)0%2100%
GetFriends(...)0%2100%
LeaveChannel(...)0%2100%
CreateChannel(...)0%2100%
JoinOrCreateChannel(...)0%2100%
GetChannelMessages(...)0%2100%
GetJoinedChannels(...)0%2100%
GetChannels(...)0%2100%
GetChannelInfo(...)0%2100%
GetChannelMembers(...)0%2100%
MuteChannel(...)0%2100%
UpdateMemoryUsage()0%2100%
RequestAudioDevices()0%2100%
SetInputAudioDevice(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WebInterface/Interface.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using DCL.CameraTool;
 4using DCL.Models;
 5using Newtonsoft.Json;
 6using UnityEngine;
 7using UnityEngine.Serialization;
 8using Ray = UnityEngine.Ray;
 9
 10#if UNITY_WEBGL && !UNITY_EDITOR
 11using System.Runtime.InteropServices;
 12#endif
 13
 14namespace DCL.Interface
 15{
 16    /**
 17     * This class contains the outgoing interface of Decentraland.
 18     * You must call those functions to interact with the WebInterface.
 19     *
 20     * The messages comming from the WebInterface instead, are reported directly to
 21     * the handler GameObject by name.
 22     */
 23    public static class WebInterface
 24    {
 125        public static bool VERBOSE = false;
 26
 27        [System.Serializable]
 28        public class ReportPositionPayload
 29        {
 30            /** Camera position, world space */
 31            public Vector3 position;
 32
 33            /** Character rotation */
 34            public Quaternion rotation;
 35
 36            /** Camera rotation */
 37            public Quaternion cameraRotation;
 38
 39            /** Camera height, relative to the feet of the avatar or ground */
 40            public float playerHeight;
 41
 42            public Vector3 mousePosition;
 43
 44            public string id;
 45        }
 46
 47        [System.Serializable]
 48        public abstract class ControlEvent
 49        {
 50            public string eventType;
 51        }
 52
 53        public abstract class ControlEvent<T> : ControlEvent
 54        {
 55            public T payload;
 56
 57            protected ControlEvent(string eventType, T payload)
 58            {
 59                this.eventType = eventType;
 60                this.payload = payload;
 61            }
 62        }
 63
 64        [System.Serializable]
 65        public class SceneReady : ControlEvent<SceneReady.Payload>
 66        {
 67
 52268            public SceneReady(int sceneNumber) : base("SceneReady", new Payload() { sceneNumber = sceneNumber }) { }
 69
 70            [System.Serializable]
 71            public class Payload
 72            {
 73                public int sceneNumber;
 74            }
 75        }
 76
 77        [System.Serializable]
 78        public class ActivateRenderingACK : ControlEvent<object>
 79        {
 080            public ActivateRenderingACK() : base("ActivateRenderingACK", null) { }
 81        }
 82
 83        [System.Serializable]
 84        public class DeactivateRenderingACK : ControlEvent<object>
 85        {
 086            public DeactivateRenderingACK() : base("DeactivateRenderingACK", null) { }
 87        }
 88
 89        [System.Serializable]
 90        public class SceneEvent<T>
 91        {
 92            public int sceneNumber;
 93            public string eventType;
 94            public T payload;
 95        }
 96
 97        [System.Serializable]
 98        public class AllScenesEvent<T>
 99        {
 100            public string eventType;
 101            public T payload;
 102        }
 103
 104        [System.Serializable]
 105        public class UUIDEvent<TPayload>
 106            where TPayload : class, new()
 107        {
 108            public string uuid;
 109            public TPayload payload = new TPayload();
 110        }
 111
 112        public enum ACTION_BUTTON
 113        {
 114            POINTER = 0,
 115            PRIMARY = 1,
 116            SECONDARY = 2,
 117            ANY = 3,
 118            FORWARD = 4,
 119            BACKWARD = 5,
 120            RIGHT = 6,
 121            LEFT = 7,
 122            JUMP = 8,
 123            WALK = 9,
 124            ACTION_3 = 10,
 125            ACTION_4 = 11,
 126            ACTION_5 = 12,
 127            ACTION_6 = 13
 128        }
 129
 130        [System.Serializable]
 131        public class OnClickEvent : UUIDEvent<OnClickEventPayload> { };
 132
 133        [System.Serializable]
 134        public class CameraModePayload
 135        {
 136            public CameraMode.ModeId cameraMode;
 137        };
 138
 139        [System.Serializable]
 140        public class Web3UseResponsePayload
 141        {
 142            public string id;
 143            public bool result;
 144        };
 145
 146        [System.Serializable]
 147        public class IdleStateChangedPayload
 148        {
 149            public bool isIdle;
 150        };
 151
 152        [System.Serializable]
 153        public class OnPointerDownEvent : UUIDEvent<OnPointerEventPayload> { };
 154
 155        [System.Serializable]
 156        public class OnGlobalPointerEvent
 157        {
 1158            public OnGlobalPointerEventPayload payload = new OnGlobalPointerEventPayload();
 159        };
 160
 161        [System.Serializable]
 162        public class OnPointerUpEvent : UUIDEvent<OnPointerEventPayload> { };
 163
 164        [System.Serializable]
 165        private class OnTextSubmitEvent : UUIDEvent<OnTextSubmitEventPayload> { };
 166
 167        [System.Serializable]
 168        private class OnTextInputChangeEvent : UUIDEvent<OnTextInputChangeEventPayload> { };
 169
 170        [System.Serializable]
 171        private class OnTextInputChangeTextEvent : UUIDEvent<OnTextInputChangeTextEventPayload> { };
 172
 173        [System.Serializable]
 174        private class OnScrollChangeEvent : UUIDEvent<OnScrollChangeEventPayload> { };
 175
 176        [System.Serializable]
 177        private class OnFocusEvent : UUIDEvent<EmptyPayload> { };
 178
 179        [System.Serializable]
 180        private class OnBlurEvent : UUIDEvent<EmptyPayload> { };
 181
 182        [System.Serializable]
 183        public class OnEnterEvent : UUIDEvent<OnEnterEventPayload> { };
 184
 185        [System.Serializable]
 186        public class OnClickEventPayload
 187        {
 188            public ACTION_BUTTON buttonId = ACTION_BUTTON.POINTER;
 189        }
 190
 191        [System.Serializable]
 192        public class SendChatMessageEvent
 193        {
 194            public ChatMessage message;
 195        }
 196
 197        [System.Serializable]
 198        public class RemoveEntityComponentsPayLoad
 199        {
 200            public string entityId;
 201            public string componentId;
 202        };
 203
 204        [System.Serializable]
 205        public class StoreSceneStateEvent
 206        {
 1207            public string type = "StoreSceneState";
 1208            public string payload = "";
 209        };
 210
 211        [System.Serializable]
 212        public class OnPointerEventPayload
 213        {
 214
 215            public ACTION_BUTTON buttonId;
 216            public Vector3 origin;
 217            public Vector3 direction;
 218            public Hit hit;
 219
 220            [System.Serializable]
 221            public class Hit
 222            {
 223                public Vector3 origin;
 224                public float length;
 225                public Vector3 hitPoint;
 226                public Vector3 normal;
 227                public Vector3 worldNormal;
 228                public string meshName;
 229                public string entityId;
 230            }
 231        }
 232
 233        [System.Serializable]
 234        public class OnGlobalPointerEventPayload : OnPointerEventPayload
 235        {
 236            public enum InputEventType
 237            {
 238                DOWN,
 239                UP
 240            }
 241
 242            public InputEventType type;
 243        }
 244
 245        [System.Serializable]
 246        public class OnTextSubmitEventPayload
 247        {
 248            public string id;
 249            public string text;
 250        }
 251
 252        [System.Serializable]
 253        public class OnTextInputChangeEventPayload
 254        {
 255            public string value;
 256        }
 257
 258        [System.Serializable]
 259        public class OnTextInputChangeTextEventPayload
 260        {
 261
 3262            public Payload value = new Payload();
 263
 264            [System.Serializable]
 265            public class Payload
 266            {
 267                public string value;
 268                public bool isSubmit;
 269            }
 270        }
 271
 272        [System.Serializable]
 273        public class OnScrollChangeEventPayload
 274        {
 275            public Vector2 value;
 276            public int pointerId;
 277        }
 278
 279        [System.Serializable]
 280        public class EmptyPayload { }
 281
 282        [System.Serializable]
 283        public class MetricsModel
 284        {
 285            public int meshes;
 286            public int bodies;
 287            public int materials;
 288            public int textures;
 289            public int triangles;
 290            public int entities;
 291
 292            public static MetricsModel operator +(MetricsModel lhs, MetricsModel rhs)
 293            {
 0294                return new MetricsModel()
 295                {
 296                    meshes = lhs.meshes + rhs.meshes,
 297                    bodies = lhs.bodies + rhs.bodies,
 298                    materials = lhs.materials + rhs.materials,
 299                    textures = lhs.textures + rhs.textures,
 300                    triangles = lhs.triangles + rhs.triangles,
 301                    entities = lhs.entities + rhs.entities
 302                };
 303            }
 304        }
 305
 306        [System.Serializable]
 307        private class OnMetricsUpdate
 308        {
 1309            public MetricsModel given = new MetricsModel();
 1310            public MetricsModel limit = new MetricsModel();
 311        }
 312
 313        [System.Serializable]
 314        public class OnEnterEventPayload { }
 315
 316        [System.Serializable]
 317        public class TransformPayload
 318        {
 0319            public Vector3 position = Vector3.zero;
 0320            public Quaternion rotation = Quaternion.identity;
 0321            public Vector3 scale = Vector3.one;
 322        }
 323
 324        public class OnSendScreenshot
 325        {
 326            public string encodedTexture;
 327            public string id;
 328        };
 329
 330        [System.Serializable]
 331        public class GotoEvent
 332        {
 333            public int x;
 334            public int y;
 335        };
 336
 337        [System.Serializable]
 338        public class BaseResolution
 339        {
 340            public int baseResolution;
 341        };
 342
 343        //-----------------------------------------------------
 344        // Raycast
 345        [System.Serializable]
 346        public class RayInfo
 347        {
 348            public Vector3 origin;
 349            public Vector3 direction;
 350            public float distance;
 351        }
 352
 353        [System.Serializable]
 354        public class RaycastHitInfo
 355        {
 356            public bool didHit;
 357            public RayInfo ray;
 358
 359            public Vector3 hitPoint;
 360            public Vector3 hitNormal;
 361        }
 362
 363        [System.Serializable]
 364        public class HitEntityInfo
 365        {
 366            public string entityId;
 367            public string meshName;
 368        }
 369
 370        [System.Serializable]
 371        public class RaycastHitEntity : RaycastHitInfo
 372        {
 373            public HitEntityInfo entity;
 374        }
 375
 376        [System.Serializable]
 377        public class RaycastHitEntities : RaycastHitInfo
 378        {
 379            public RaycastHitEntity[] entities;
 380        }
 381
 382        [System.Serializable]
 383        public class RaycastResponse<T> where T : RaycastHitInfo
 384        {
 385            public string queryId;
 386            public string queryType;
 387            public T payload;
 388        }
 389
 390        // Note (Zak): We need to explicitly define this classes for the JsonUtility to
 391        // be able to serialize them
 392        [System.Serializable]
 393        public class RaycastHitFirstResponse : RaycastResponse<RaycastHitEntity> { }
 394
 395        [System.Serializable]
 396        public class RaycastHitAllResponse : RaycastResponse<RaycastHitEntities> { }
 397
 398        [System.Serializable]
 399        public class UserAcceptedCollectiblesPayload
 400        {
 401            public string id;
 402        }
 403
 404        [System.Serializable]
 405        public class SendBlockPlayerPayload
 406        {
 407            public string userId;
 408        }
 409
 410        [Serializable]
 411        private class SendReportPlayerPayload
 412        {
 413            public string userId;
 414            public string name;
 415        }
 416
 417        [Serializable]
 418        private class SendReportScenePayload
 419        {
 420            public int sceneNumber;
 421        }
 422
 423        [Serializable]
 424        private class SetHomeScenePayload
 425        {
 426            public string sceneCoords;
 427        }
 428
 429        [System.Serializable]
 430        public class SendUnblockPlayerPayload
 431        {
 432            public string userId;
 433        }
 434
 435        [System.Serializable]
 436        public class TutorialStepPayload
 437        {
 438            public int tutorialStep;
 439        }
 440
 441        [System.Serializable]
 442        public class PerformanceReportPayload
 443        {
 444            public string samples;
 445            public bool fpsIsCapped;
 446            public int hiccupsInThousandFrames;
 447            public float hiccupsTime;
 448            public float totalTime;
 449            public int gltfInProgress;
 450            public int gltfFailed;
 451            public int gltfCancelled;
 452            public int gltfLoaded;
 453            public int abInProgress;
 454            public int abFailed;
 455            public int abCancelled;
 456            public int abLoaded;
 457            public int gltfTexturesLoaded;
 458            public int abTexturesLoaded;
 459            public int promiseTexturesLoaded;
 460            public int enqueuedMessages;
 461            public int processedMessages;
 462            public int playerCount;
 463            public int loadRadius;
 464            public object drawCalls; //int *
 465            public object memoryReserved; //long, in total bytes *
 466            public object memoryUsage; //long, in total bytes *
 467            public object totalGCAlloc; //long, in total bytes, its the sum of all GCAllocs per frame over 1000 frames *
 468            public Dictionary<int, long> sceneScores;
 469
 470            //* is NULL if SendProfilerMetrics is false
 471        }
 472
 473        [System.Serializable]
 474        public class SystemInfoReportPayload
 475        {
 0476            public string graphicsDeviceName = SystemInfo.graphicsDeviceName;
 0477            public string graphicsDeviceVersion = SystemInfo.graphicsDeviceVersion;
 0478            public int graphicsMemorySize = SystemInfo.graphicsMemorySize;
 0479            public string processorType = SystemInfo.processorType;
 0480            public int processorCount = SystemInfo.processorCount;
 0481            public int systemMemorySize = SystemInfo.systemMemorySize;
 482
 483            // TODO: remove useBinaryTransform after ECS7 is fully in prod
 0484            public bool useBinaryTransform = true;
 485        }
 486
 487        [System.Serializable]
 488        public class GenericAnalyticPayload
 489        {
 490            public string eventName;
 491            public Dictionary<object, object> data;
 492        }
 493
 494        [System.Serializable]
 495        public class PerformanceHiccupPayload
 496        {
 497            public int hiccupsInThousandFrames;
 498            public float hiccupsTime;
 499            public float totalTime;
 500        }
 501
 502        [System.Serializable]
 503        public class TermsOfServiceResponsePayload
 504        {
 505            public int sceneNumber;
 506            public bool dontShowAgain;
 507            public bool accepted;
 508        }
 509
 510        [System.Serializable]
 511        public class OpenURLPayload
 512        {
 513            public string url;
 514        }
 515
 516        [System.Serializable]
 517        public class GIFSetupPayload
 518        {
 519            public string imageSource;
 520            public string id;
 521            public bool isWebGL1;
 522        }
 523
 524        [System.Serializable]
 525        public class RequestScenesInfoAroundParcelPayload
 526        {
 527            public Vector2 parcel;
 528            public int scenesAround;
 529        }
 530
 531        [System.Serializable]
 532        public class AudioStreamingPayload
 533        {
 534            public string url;
 535            public bool play;
 536            public float volume;
 537        }
 538
 539        [System.Serializable]
 540        public class SetScenesLoadRadiusPayload
 541        {
 542            public float newRadius;
 543        }
 544
 545        [System.Serializable]
 546        public class SetVoiceChatRecordingPayload
 547        {
 548            public bool recording;
 549        }
 550
 551        [System.Serializable]
 552        public class ApplySettingsPayload
 553        {
 554            public float voiceChatVolume;
 555            public int voiceChatAllowCategory;
 556        }
 557
 558        [Serializable]
 559        public class UserRealmPayload
 560        {
 561            public string serverName;
 562            public string layer;
 563        }
 564
 565        [System.Serializable]
 566        public class JumpInPayload
 567        {
 1568            public UserRealmPayload realm = new UserRealmPayload();
 569            public Vector2 gridPosition;
 570        }
 571
 572        [System.Serializable]
 573        public class LoadingFeedbackMessage
 574        {
 575            public string message;
 576            public int loadPercentage;
 577        }
 578
 579        [System.Serializable]
 580        public class AnalyticsPayload
 581        {
 582
 583            public string name;
 584            public Property[] properties;
 585
 586            [System.Serializable]
 587            public class Property
 588            {
 589                public string key;
 590                public string value;
 591
 0592                public Property(string key, string value)
 593                {
 0594                    this.key = key;
 0595                    this.value = value;
 0596                }
 597            }
 598        }
 599
 600        [System.Serializable]
 601        public class DelightedSurveyEnabledPayload
 602        {
 603            public bool enabled;
 604        }
 605
 606        [System.Serializable]
 607        public class ExternalActionSceneEventPayload
 608        {
 609            public string type;
 610            public string payload;
 611        }
 612
 613        [System.Serializable]
 614        public class MuteUserPayload
 615        {
 616            public string[] usersId;
 617            public bool mute;
 618        }
 619
 620        [System.Serializable]
 621        public class CloseUserAvatarPayload
 622        {
 623            public bool isSignUpFlow;
 624        }
 625
 626        [System.Serializable]
 627        public class StringPayload
 628        {
 629            public string value;
 630        }
 631
 632        [System.Serializable]
 633        public class KillPortableExperiencePayload
 634        {
 635            public string portableExperienceId;
 636        }
 637
 638        [System.Serializable]
 639        public class SetDisabledPortableExperiencesPayload
 640        {
 641            public string[] idsToDisable;
 642        }
 643
 644        [System.Serializable]
 645        public class WearablesRequestFiltersPayload
 646        {
 647            public string ownedByUser;
 648            public string[] wearableIds;
 649            public string[] collectionIds;
 650            public string thirdPartyId;
 651        }
 652
 653        [System.Serializable]
 654        public class EmotesRequestFiltersPayload
 655        {
 656            public string ownedByUser;
 657            public string[] emoteIds;
 658            public string[] collectionIds;
 659            public string thirdPartyId;
 660        }
 661
 662        [System.Serializable]
 663        public class RequestWearablesPayload
 664        {
 665            public WearablesRequestFiltersPayload filters;
 666            public string context;
 667        }
 668
 669        [System.Serializable]
 670        public class RequestEmotesPayload
 671        {
 672            public EmotesRequestFiltersPayload filters;
 673            public string context;
 674        }
 675
 676        [System.Serializable]
 677        public class HeadersPayload
 678        {
 679            public string method;
 680            public string url;
 1681            public Dictionary<string, object> metadata = new Dictionary<string, object>();
 682        }
 683
 684        [System.Serializable]
 685        public class SearchENSOwnerPayload
 686        {
 687            public string name;
 688            public int maxResults;
 689        }
 690
 691        [System.Serializable]
 692        public class UnpublishScenePayload
 693        {
 694            public string coordinates;
 695        }
 696
 697        [System.Serializable]
 698        public class AvatarStateBase
 699        {
 700            public string type;
 701            public string avatarShapeId;
 702        }
 703
 704        [System.Serializable]
 705        public class AvatarStateSceneChanged : AvatarStateBase
 706        {
 707            public int sceneNumber;
 708        }
 709
 710        [System.Serializable]
 711        public class AvatarOnClickPayload
 712        {
 713            public string userId;
 1714            public RayInfo ray = new RayInfo();
 715        }
 716
 717        [System.Serializable]
 718        public class TimeReportPayload
 719        {
 720            public float timeNormalizationFactor;
 721            public float cycleTime;
 722            public bool isPaused;
 723            public float time;
 724        }
 725
 726        [System.Serializable]
 727        public class GetFriendsWithDirectMessagesPayload
 728        {
 729            public string userNameOrId;
 730            public int limit;
 731            public int skip;
 732        }
 733
 734        [System.Serializable]
 735        public class MarkMessagesAsSeenPayload
 736        {
 737            public string userId;
 738        }
 739
 740        [System.Serializable]
 741        public class MarkChannelMessagesAsSeenPayload
 742        {
 743            public string channelId;
 744        }
 745
 746        [System.Serializable]
 747        public class GetPrivateMessagesPayload
 748        {
 749            public string userId;
 750            public int limit;
 751            public string fromMessageId;
 752        }
 753
 754        [Serializable]
 755        public class FriendshipUpdateStatusMessage
 756        {
 757            public string userId;
 758            public FriendshipAction action;
 759        }
 760
 761        [Serializable]
 762        public class SetInputAudioDevicePayload
 763        {
 764            public string deviceId;
 765        }
 766
 767        public enum FriendshipAction
 768        {
 769            NONE,
 770            APPROVED,
 771            REJECTED,
 772            CANCELLED,
 773            REQUESTED_FROM,
 774            REQUESTED_TO,
 775            DELETED
 776        }
 777
 778        [Serializable]
 779        private class GetFriendsPayload
 780        {
 781            public string userNameOrId;
 782            public int limit;
 783            public int skip;
 784        }
 785
 786        [Serializable]
 787        private class LeaveChannelPayload
 788        {
 789            public string channelId;
 790        }
 791
 792        [Serializable]
 793        private class CreateChannelPayload
 794        {
 795            public string channelId;
 796        }
 797
 798        public struct MuteChannelPayload
 799        {
 800            public string channelId;
 801            public bool muted;
 802        }
 803
 804        [Serializable]
 805        private class JoinOrCreateChannelPayload
 806        {
 807            public string channelId;
 808        }
 809
 810        [Serializable]
 811        private class GetChannelMessagesPayload
 812        {
 813            public string channelId;
 814            public int limit;
 815            public string from;
 816        }
 817
 818        [Serializable]
 819        private class GetJoinedChannelsPayload
 820        {
 821            public int limit;
 822            public int skip;
 823        }
 824
 825        [Serializable]
 826        private class GetChannelsPayload
 827        {
 828            public int limit;
 829            public string since;
 830            public string name;
 831        }
 832
 833        [Serializable]
 834        private class GetChannelInfoPayload
 835        {
 836            public string[] channelIds;
 837        }
 838
 839        [Serializable]
 840        private class GetChannelMembersPayload
 841        {
 842            public string channelId;
 843            public int limit;
 844            public int skip;
 845            public string userName;
 846        }
 847
 848        public static event Action<string, byte[]> OnBinaryMessageFromEngine;
 849
 850#if UNITY_WEBGL && !UNITY_EDITOR
 851    /**
 852     * This method is called after the first render. It marks the loading of the
 853     * rest of the JS client.
 854     */
 855    [DllImport("__Internal")] public static extern void StartDecentraland();
 856    [DllImport("__Internal")] public static extern void MessageFromEngine(string type, string message);
 857    [DllImport("__Internal")] public static extern string GetGraphicCard();
 858
 859    public static System.Action<string, string> OnMessageFromEngine;
 860#else
 861        public static Action<string, string> OnMessageFromEngine
 862        {
 863            set
 864            {
 64865                OnMessage = value;
 64866                if (OnMessage != null)
 867                {
 32868                    ProcessQueuedMessages();
 869                }
 64870            }
 3925871            get => OnMessage;
 872        }
 873        private static Action<string, string> OnMessage;
 874
 1875        private static bool hasQueuedMessages = false;
 1876        private static List<(string, string)> queuedMessages = new List<(string, string)>();
 0877        public static void StartDecentraland() { }
 0878        public static bool CheckURLParam(string targetParam) { return false; }
 0879        public static string GetURLParam(string targetParam) { return String.Empty; }
 880
 881        public static void MessageFromEngine(string type, string message)
 882        {
 2565883            if (OnMessageFromEngine != null)
 884            {
 1296885                if (hasQueuedMessages)
 886                {
 0887                    ProcessQueuedMessages();
 888                }
 889
 1296890                OnMessageFromEngine.Invoke(type, message);
 1296891                if (VERBOSE)
 892                {
 0893                    Debug.Log("MessageFromEngine called with: " + type + ", " + message);
 894                }
 895            }
 896            else
 897            {
 1269898                lock (queuedMessages)
 899                {
 1269900                    queuedMessages.Add((type, message));
 1269901                }
 902
 1269903                hasQueuedMessages = true;
 904            }
 2565905        }
 906
 907        private static void ProcessQueuedMessages()
 908        {
 32909            hasQueuedMessages = false;
 32910            lock (queuedMessages)
 911            {
 2548912                foreach ((string type, string payload) in queuedMessages)
 913                {
 1242914                    MessageFromEngine(type, payload);
 915                }
 916
 32917                queuedMessages.Clear();
 32918            }
 32919        }
 920
 1921        public static string GetGraphicCard() => "In Editor Graphic Card";
 922#endif
 923
 924        public static void SendMessage(string type)
 925        {
 926            // sending an empty JSON object to be compatible with other messages
 5927            MessageFromEngine(type, "{}");
 5928        }
 929
 930        public static void SendMessage<T>(string type, T message)
 931        {
 1318932            string messageJson = JsonUtility.ToJson(message);
 1318933            SendJson(type, messageJson);
 1318934        }
 935
 936        public static void SendJson(string type, string json)
 937        {
 1318938            if (VERBOSE)
 939            {
 0940                Debug.Log($"Sending message: " + json);
 941            }
 942
 1318943            MessageFromEngine(type, json);
 1318944        }
 945
 1946        private static ReportPositionPayload positionPayload = new ReportPositionPayload();
 1947        private static CameraModePayload cameraModePayload = new CameraModePayload();
 1948        private static Web3UseResponsePayload web3UseResponsePayload = new Web3UseResponsePayload();
 1949        private static IdleStateChangedPayload idleStateChangedPayload = new IdleStateChangedPayload();
 1950        private static OnMetricsUpdate onMetricsUpdate = new OnMetricsUpdate();
 1951        private static OnClickEvent onClickEvent = new OnClickEvent();
 1952        private static OnPointerDownEvent onPointerDownEvent = new OnPointerDownEvent();
 1953        private static OnPointerUpEvent onPointerUpEvent = new OnPointerUpEvent();
 1954        private static OnTextSubmitEvent onTextSubmitEvent = new OnTextSubmitEvent();
 1955        private static OnTextInputChangeEvent onTextInputChangeEvent = new OnTextInputChangeEvent();
 1956        private static OnTextInputChangeTextEvent onTextInputChangeTextEvent = new OnTextInputChangeTextEvent();
 1957        private static OnScrollChangeEvent onScrollChangeEvent = new OnScrollChangeEvent();
 1958        private static OnFocusEvent onFocusEvent = new OnFocusEvent();
 1959        private static OnBlurEvent onBlurEvent = new OnBlurEvent();
 1960        private static OnEnterEvent onEnterEvent = new OnEnterEvent();
 1961        private static OnSendScreenshot onSendScreenshot = new OnSendScreenshot();
 1962        private static OnPointerEventPayload onPointerEventPayload = new OnPointerEventPayload();
 1963        private static OnGlobalPointerEventPayload onGlobalPointerEventPayload = new OnGlobalPointerEventPayload();
 1964        private static OnGlobalPointerEvent onGlobalPointerEvent = new OnGlobalPointerEvent();
 1965        private static AudioStreamingPayload onAudioStreamingEvent = new AudioStreamingPayload();
 1966        private static SetVoiceChatRecordingPayload setVoiceChatRecordingPayload = new SetVoiceChatRecordingPayload();
 1967        private static SetScenesLoadRadiusPayload setScenesLoadRadiusPayload = new SetScenesLoadRadiusPayload();
 1968        private static ApplySettingsPayload applySettingsPayload = new ApplySettingsPayload();
 1969        private static GIFSetupPayload gifSetupPayload = new GIFSetupPayload();
 1970        private static JumpInPayload jumpInPayload = new JumpInPayload();
 1971        private static GotoEvent gotoEvent = new GotoEvent();
 1972        private static SendChatMessageEvent sendChatMessageEvent = new SendChatMessageEvent();
 1973        private static BaseResolution baseResEvent = new BaseResolution();
 1974        private static AnalyticsPayload analyticsEvent = new AnalyticsPayload();
 1975        private static DelightedSurveyEnabledPayload delightedSurveyEnabled = new DelightedSurveyEnabledPayload();
 1976        private static ExternalActionSceneEventPayload sceneExternalActionEvent = new ExternalActionSceneEventPayload();
 1977        private static MuteUserPayload muteUserEvent = new MuteUserPayload();
 1978        private static StoreSceneStateEvent storeSceneState = new StoreSceneStateEvent();
 1979        private static CloseUserAvatarPayload closeUserAvatarPayload = new CloseUserAvatarPayload();
 1980        private static StringPayload stringPayload = new StringPayload();
 1981        private static KillPortableExperiencePayload killPortableExperiencePayload = new KillPortableExperiencePayload()
 1982        private static SetDisabledPortableExperiencesPayload setDisabledPortableExperiencesPayload = new SetDisabledPort
 1983        private static RequestWearablesPayload requestWearablesPayload = new RequestWearablesPayload();
 1984        private static RequestEmotesPayload requestEmotesPayload = new RequestEmotesPayload();
 1985        private static SearchENSOwnerPayload searchEnsOwnerPayload = new SearchENSOwnerPayload();
 1986        private static HeadersPayload headersPayload = new HeadersPayload();
 1987        private static AvatarStateBase avatarStatePayload = new AvatarStateBase();
 1988        private static AvatarStateSceneChanged avatarSceneChangedPayload = new AvatarStateSceneChanged();
 1989        public static AvatarOnClickPayload avatarOnClickPayload = new AvatarOnClickPayload();
 1990        private static UUIDEvent<EmptyPayload> onPointerHoverEnterEvent = new UUIDEvent<EmptyPayload>();
 1991        private static UUIDEvent<EmptyPayload> onPointerHoverExitEvent = new UUIDEvent<EmptyPayload>();
 1992        private static TimeReportPayload timeReportPayload = new TimeReportPayload();
 1993        private static GetFriendsWithDirectMessagesPayload getFriendsWithDirectMessagesPayload = new GetFriendsWithDirec
 1994        private static MarkMessagesAsSeenPayload markMessagesAsSeenPayload = new MarkMessagesAsSeenPayload();
 1995        private static MarkChannelMessagesAsSeenPayload markChannelMessagesAsSeenPayload = new MarkChannelMessagesAsSeen
 1996        private static GetPrivateMessagesPayload getPrivateMessagesPayload = new GetPrivateMessagesPayload();
 997
 998        public static void SendSceneEvent<T> (int sceneNumber, string eventType, T payload)
 999        {
 4741000            SceneEvent<T> sceneEvent = new SceneEvent<T>();
 4741001            sceneEvent.sceneNumber = sceneNumber;
 4741002            sceneEvent.eventType = eventType;
 4741003            sceneEvent.payload = payload;
 1004
 4741005            SendMessage("SceneEvent", sceneEvent);
 4741006        }
 1007
 1008        private static void SendAllScenesEvent<T>(string eventType, T payload)
 1009        {
 4281010            AllScenesEvent<T> allScenesEvent = new AllScenesEvent<T>();
 4281011            allScenesEvent.eventType = eventType;
 4281012            allScenesEvent.payload = payload;
 1013
 4281014            SendMessage("AllScenesEvent", allScenesEvent);
 4281015        }
 1016
 1017        public static void ReportPosition(Vector3 position, Quaternion rotation, float playerHeight, Quaternion cameraRo
 1018        {
 431019            positionPayload.position = position;
 431020            positionPayload.rotation = rotation;
 431021            positionPayload.playerHeight = playerHeight;
 431022            positionPayload.cameraRotation = cameraRotation;
 1023
 431024            SendMessage("ReportPosition", positionPayload);
 431025        }
 1026
 8541027        public static void ReportCameraChanged(CameraMode.ModeId cameraMode) { ReportCameraChanged(cameraMode, -1); }
 1028
 1029        public static void ReportCameraChanged(CameraMode.ModeId cameraMode, int targetSceneNumber)
 1030        {
 6881031            cameraModePayload.cameraMode = cameraMode;
 6881032            if (targetSceneNumber > 0)
 1033            {
 2611034                SendSceneEvent(targetSceneNumber, "cameraModeChanged", cameraModePayload);
 1035            }
 1036            else
 1037            {
 4271038                SendAllScenesEvent("cameraModeChanged", cameraModePayload);
 1039            }
 4271040        }
 1041
 1042        public static void Web3UseResponse(string id, bool result)
 1043        {
 01044            web3UseResponsePayload.id = id;
 01045            web3UseResponsePayload.result = result;
 01046            SendMessage("Web3UseResponse", web3UseResponsePayload);
 01047        }
 1048
 1049        public static void ReportIdleStateChanged(bool isIdle)
 1050        {
 11051            idleStateChangedPayload.isIdle = isIdle;
 11052            SendAllScenesEvent("idleStateChanged", idleStateChangedPayload);
 11053        }
 1054
 5221055        public static void ReportControlEvent<T>(T controlEvent) where T : ControlEvent { SendMessage("ControlEvent", co
 1056
 1057        public static void SendRequestHeadersForUrl(string eventName, string method, string url, Dictionary<string, obje
 1058        {
 01059            headersPayload.method = method;
 01060            headersPayload.url = url;
 01061            if (metadata != null)
 01062                headersPayload.metadata = metadata;
 01063            SendMessage(eventName, headersPayload);
 01064        }
 1065
 01066        public static void BuilderInWorldMessage(string type, string message) { MessageFromEngine(type, message); }
 1067
 1068        public static void ReportOnClickEvent(int sceneNumber, string uuid)
 1069        {
 61070            if (string.IsNullOrEmpty(uuid))
 1071            {
 01072                return;
 1073            }
 1074
 61075            onClickEvent.uuid = uuid;
 1076
 61077            SendSceneEvent(sceneNumber, "uuidEvent", onClickEvent);
 61078        }
 1079
 1080        // TODO: Add sceneNumber to this response
 1081        private static void ReportRaycastResult<T, P>(int sceneNumber, string queryId, string queryType, P payload) wher
 1082        {
 01083            T response = new T();
 01084            response.queryId = queryId;
 01085            response.queryType = queryType;
 01086            response.payload = payload;
 1087
 01088            SendSceneEvent<T>(sceneNumber, "raycastResponse", response);
 01089        }
 1090
 01091        public static void ReportRaycastHitFirstResult(int sceneNumber, string queryId, RaycastType raycastType, Raycast
 1092
 01093        public static void ReportRaycastHitAllResult(int sceneNumber, string queryId, RaycastType raycastType, RaycastHi
 1094
 1095        private static OnPointerEventPayload.Hit CreateHitObject(string entityId, string meshName, Vector3 point,
 1096            Vector3 normal, float distance)
 1097        {
 191098            OnPointerEventPayload.Hit hit = new OnPointerEventPayload.Hit();
 1099
 191100            hit.hitPoint = point;
 191101            hit.length = distance;
 191102            hit.normal = normal;
 191103            hit.worldNormal = normal;
 191104            hit.meshName = meshName;
 191105            hit.entityId = entityId;
 1106
 191107            return hit;
 1108        }
 1109
 1110        private static void SetPointerEventPayload(OnPointerEventPayload pointerEventPayload, ACTION_BUTTON buttonId,
 1111            string entityId, string meshName, Ray ray, Vector3 point, Vector3 normal, float distance,
 1112            bool isHitInfoValid)
 1113        {
 201114            pointerEventPayload.origin = ray.origin;
 201115            pointerEventPayload.direction = ray.direction;
 201116            pointerEventPayload.buttonId = buttonId;
 1117
 201118            if (isHitInfoValid)
 191119                pointerEventPayload.hit = CreateHitObject(entityId, meshName, point, normal, distance);
 1120            else
 11121                pointerEventPayload.hit = null;
 11122        }
 1123
 1124        public static void ReportGlobalPointerDownEvent(ACTION_BUTTON buttonId, Ray ray, Vector3 point, Vector3 normal,
 1125            float distance, int sceneNumber, string entityId = "0", string meshName = null, bool isHitInfoValid = false)
 1126        {
 111127            SetPointerEventPayload((OnPointerEventPayload) onGlobalPointerEventPayload, buttonId,
 1128                entityId, meshName, ray, point, normal, distance,
 1129                isHitInfoValid);
 111130            onGlobalPointerEventPayload.type = OnGlobalPointerEventPayload.InputEventType.DOWN;
 1131
 111132            onGlobalPointerEvent.payload = onGlobalPointerEventPayload;
 1133
 111134            SendSceneEvent(sceneNumber, "actionButtonEvent", onGlobalPointerEvent);
 111135        }
 1136
 1137        public static void ReportGlobalPointerUpEvent(ACTION_BUTTON buttonId, Ray ray, Vector3 point, Vector3 normal,
 1138            float distance, int sceneNumber, string entityId = "0", string meshName = null, bool isHitInfoValid = false)
 1139        {
 31140            SetPointerEventPayload((OnPointerEventPayload) onGlobalPointerEventPayload, buttonId,
 1141                entityId, meshName, ray, point, normal, distance,
 1142                isHitInfoValid);
 31143            onGlobalPointerEventPayload.type = OnGlobalPointerEventPayload.InputEventType.UP;
 1144
 31145            onGlobalPointerEvent.payload = onGlobalPointerEventPayload;
 1146
 31147            SendSceneEvent(sceneNumber, "actionButtonEvent", onGlobalPointerEvent);
 31148        }
 1149
 1150        public static void ReportOnPointerDownEvent(ACTION_BUTTON buttonId, int sceneNumber, string uuid,
 1151            string entityId, string meshName, Ray ray, Vector3 point, Vector3 normal, float distance)
 1152        {
 41153            if (string.IsNullOrEmpty(uuid))
 1154            {
 01155                return;
 1156            }
 1157
 41158            onPointerDownEvent.uuid = uuid;
 41159            SetPointerEventPayload(onPointerEventPayload, buttonId, entityId, meshName, ray, point,
 1160                normal, distance, isHitInfoValid: true);
 41161            onPointerDownEvent.payload = onPointerEventPayload;
 1162
 41163            SendSceneEvent(sceneNumber, "uuidEvent", onPointerDownEvent);
 41164        }
 1165
 1166        public static void ReportOnPointerUpEvent(ACTION_BUTTON buttonId, int sceneNumber, string uuid, string entityId,
 1167            string meshName, Ray ray, Vector3 point, Vector3 normal, float distance)
 1168        {
 21169            if (string.IsNullOrEmpty(uuid))
 1170            {
 01171                return;
 1172            }
 1173
 21174            onPointerUpEvent.uuid = uuid;
 21175            SetPointerEventPayload(onPointerEventPayload, buttonId, entityId, meshName, ray, point,
 1176                normal, distance, isHitInfoValid: true);
 21177            onPointerUpEvent.payload = onPointerEventPayload;
 1178
 21179            SendSceneEvent(sceneNumber, "uuidEvent", onPointerUpEvent);
 21180        }
 1181
 1182        public static void ReportOnTextSubmitEvent(int sceneNumber, string uuid, string text)
 1183        {
 21184            if (string.IsNullOrEmpty(uuid))
 1185            {
 01186                return;
 1187            }
 1188
 21189            onTextSubmitEvent.uuid = uuid;
 21190            onTextSubmitEvent.payload.text = text;
 1191
 21192            SendSceneEvent(sceneNumber, "uuidEvent", onTextSubmitEvent);
 21193        }
 1194
 1195        public static void ReportOnTextInputChangedEvent(int sceneNumber, string uuid, string text)
 1196        {
 171197            if (string.IsNullOrEmpty(uuid))
 1198            {
 171199                return;
 1200            }
 1201
 01202            onTextInputChangeEvent.uuid = uuid;
 01203            onTextInputChangeEvent.payload.value = text;
 1204
 01205            SendSceneEvent(sceneNumber, "uuidEvent", onTextInputChangeEvent);
 01206        }
 1207
 1208        public static void ReportOnTextInputChangedTextEvent(int sceneNumber, string uuid, string text, bool isSubmit)
 1209        {
 191210            if (string.IsNullOrEmpty(uuid))
 1211            {
 161212                return;
 1213            }
 1214
 31215            onTextInputChangeTextEvent.uuid = uuid;
 31216            onTextInputChangeTextEvent.payload.value.value = text;
 31217            onTextInputChangeTextEvent.payload.value.isSubmit = isSubmit;
 1218
 31219            SendSceneEvent(sceneNumber, "uuidEvent", onTextInputChangeTextEvent);
 31220        }
 1221
 1222        public static void ReportOnFocusEvent(int sceneNumber, string uuid)
 1223        {
 21224            if (string.IsNullOrEmpty(uuid))
 1225            {
 21226                return;
 1227            }
 1228
 01229            onFocusEvent.uuid = uuid;
 01230            SendSceneEvent(sceneNumber, "uuidEvent", onFocusEvent);
 01231        }
 1232
 1233        public static void ReportOnBlurEvent(int sceneNumber, string uuid)
 1234        {
 21235            if (string.IsNullOrEmpty(uuid))
 1236            {
 21237                return;
 1238            }
 1239
 01240            onBlurEvent.uuid = uuid;
 01241            SendSceneEvent(sceneNumber, "uuidEvent", onBlurEvent);
 01242        }
 1243
 1244        public static void ReportOnScrollChange(int sceneNumber, string uuid, Vector2 value, int pointerId)
 1245        {
 151246            if (string.IsNullOrEmpty(uuid))
 1247            {
 131248                return;
 1249            }
 1250
 21251            onScrollChangeEvent.uuid = uuid;
 21252            onScrollChangeEvent.payload.value = value;
 21253            onScrollChangeEvent.payload.pointerId = pointerId;
 1254
 21255            SendSceneEvent(sceneNumber, "uuidEvent", onScrollChangeEvent);
 21256        }
 1257
 01258        public static void ReportEvent<T>(int sceneNumber, T @event) { SendSceneEvent(sceneNumber, "uuidEvent", @event);
 1259
 1260        public static void ReportOnMetricsUpdate(int sceneNumber, MetricsModel current,
 1261            MetricsModel limit)
 1262        {
 1751263            onMetricsUpdate.given = current;
 1751264            onMetricsUpdate.limit = limit;
 1265
 1751266            SendSceneEvent(sceneNumber, "metricsUpdate", onMetricsUpdate);
 1751267        }
 1268
 1269        public static void ReportOnEnterEvent(int sceneNumber, string uuid)
 1270        {
 01271            if (string.IsNullOrEmpty(uuid))
 01272                return;
 1273
 01274            onEnterEvent.uuid = uuid;
 1275
 01276            SendSceneEvent(sceneNumber, "uuidEvent", onEnterEvent);
 01277        }
 1278
 01279        public static void LogOut() { SendMessage("LogOut"); }
 1280
 01281        public static void RedirectToSignUp() { SendMessage("RedirectToSignUp"); }
 1282
 01283        public static void PreloadFinished(int sceneNumber) { SendMessage("PreloadFinished", sceneNumber); }
 1284
 1285        public static void ReportMousePosition(Vector3 mousePosition, string id)
 1286        {
 01287            positionPayload.mousePosition = mousePosition;
 01288            positionPayload.id = id;
 01289            SendMessage("ReportMousePosition", positionPayload);
 01290        }
 1291
 1292        public static void SendScreenshot(string encodedTexture, string id)
 1293        {
 01294            onSendScreenshot.encodedTexture = encodedTexture;
 01295            onSendScreenshot.id = id;
 01296            SendMessage("SendScreenshot", onSendScreenshot);
 01297        }
 1298
 1299        public static void SetDelightedSurveyEnabled(bool enabled)
 1300        {
 01301            delightedSurveyEnabled.enabled = enabled;
 01302            SendMessage("SetDelightedSurveyEnabled", delightedSurveyEnabled);
 01303        }
 1304
 1305        public static void SetScenesLoadRadius(float newRadius)
 1306        {
 11307            setScenesLoadRadiusPayload.newRadius = newRadius;
 11308            SendMessage("SetScenesLoadRadius", setScenesLoadRadiusPayload);
 11309        }
 1310
 1311        [System.Serializable]
 1312        public class SaveAvatarPayload
 1313        {
 1314            public string face256;
 1315            public string body;
 1316            public bool isSignUpFlow;
 1317            public AvatarModel avatar;
 1318        }
 1319
 1320        public static class RendererAuthenticationType
 1321        {
 01322            public static string Guest => "guest";
 01323            public static string WalletConnect => "wallet_connect";
 1324        }
 1325
 1326        [System.Serializable]
 1327        public class SendAuthenticationPayload
 1328        {
 1329            public string rendererAuthenticationType;
 1330        }
 1331
 1332        [System.Serializable]
 1333        public class SendPassportPayload
 1334        {
 1335            public string name;
 1336            public string email;
 1337        }
 1338
 1339        [System.Serializable]
 1340        public class SendSaveUserUnverifiedNamePayload
 1341        {
 1342            public string newUnverifiedName;
 1343        }
 1344
 1345        [System.Serializable]
 1346        public class SendSaveUserDescriptionPayload
 1347        {
 1348            public string description;
 1349
 01350            public SendSaveUserDescriptionPayload(string description) { this.description = description; }
 1351        }
 1352
 1353        [System.Serializable]
 1354        public class SendRequestUserProfilePayload
 1355        {
 1356            public string value;
 1357        }
 1358
 1359        [Serializable]
 1360        public class SendVideoProgressEvent
 1361        {
 1362            public string componentId;
 1363            public int sceneNumber;
 1364            public string videoTextureId;
 1365            public int status;
 1366            public float currentOffset;
 1367            public float videoLength;
 1368        }
 1369
 21370        public static void RequestOwnProfileUpdate() { SendMessage("RequestOwnProfileUpdate"); }
 1371
 1372        public static void SendSaveAvatar(AvatarModel avatar, Texture2D face256Snapshot, Texture2D bodySnapshot, bool is
 1373        {
 11374            var payload = new SaveAvatarPayload()
 1375            {
 1376                avatar = avatar,
 1377                face256 = System.Convert.ToBase64String(face256Snapshot.EncodeToPNG()),
 1378                body = System.Convert.ToBase64String(bodySnapshot.EncodeToPNG()),
 1379                isSignUpFlow = isSignUpFlow
 1380            };
 11381            SendMessage("SaveUserAvatar", payload);
 11382        }
 1383
 01384        public static void SendAuthentication(string rendererAuthenticationType) { SendMessage("SendAuthentication", new
 1385
 21386        public static void SendPassport(string name, string email) { SendMessage("SendPassport", new SendPassportPayload
 1387
 1388        public static void SendSaveUserUnverifiedName(string newName)
 1389        {
 01390            var payload = new SendSaveUserUnverifiedNamePayload()
 1391            {
 1392                newUnverifiedName = newName
 1393            };
 1394
 01395            SendMessage("SaveUserUnverifiedName", payload);
 01396        }
 1397
 01398        public static void SendSaveUserDescription(string about) { SendMessage("SaveUserDescription", new SendSaveUserDe
 1399
 01400        public static void SendRequestUserProfile(string userId) { SendMessage("RequestUserProfile", new SendRequestUser
 1401
 21402        public static void SendUserAcceptedCollectibles(string airdropId) { SendMessage("UserAcceptedCollectibles", new 
 1403
 01404        public static void SaveUserTutorialStep(int newTutorialStep) { SendMessage("SaveUserTutorialStep", new TutorialS
 1405
 01406        public static void SendPerformanceReport(string performanceReportPayload) { SendJson("PerformanceReport", perfor
 1407
 01408        public static void SendSystemInfoReport() { SendMessage("SystemInfoReport", new SystemInfoReportPayload()); }
 1409
 1410        public static void SendTermsOfServiceResponse(int sceneNumber, bool accepted, bool dontShowAgain)
 1411        {
 21412            var payload = new TermsOfServiceResponsePayload()
 1413            {
 1414                sceneNumber = sceneNumber,
 1415                accepted = accepted,
 1416                dontShowAgain = dontShowAgain
 1417            };
 21418            SendMessage("TermsOfServiceResponse", payload);
 21419        }
 1420
 1421        public static void OpenURL(string url)
 1422        {
 1423#if UNITY_WEBGL
 31424            SendMessage("OpenWebURL", new OpenURLPayload { url = url });
 1425#else
 1426            Application.OpenURL(url);
 1427#endif
 31428        }
 1429
 01430        public static void PublishStatefulScene(ProtocolV2.PublishPayload payload) { MessageFromEngine("PublishSceneStat
 1431
 1432        public static void SendReportScene(int sceneNumber)
 1433        {
 11434            SendMessage("ReportScene", new SendReportScenePayload
 1435            {
 1436                sceneNumber = sceneNumber
 1437            });
 11438        }
 1439
 1440        public static void SetHomeScene(string sceneCoords)
 1441        {
 01442            SendMessage("SetHomeScene", new SetHomeScenePayload
 1443            {
 1444                sceneCoords = sceneCoords
 1445            });
 01446        }
 1447
 1448        public static void SendReportPlayer(string playerId, string playerName)
 1449        {
 11450            SendMessage("ReportPlayer", new SendReportPlayerPayload
 1451            {
 1452                userId = playerId,
 1453                name = playerName
 1454            });
 11455        }
 1456
 1457        public static void SendBlockPlayer(string userId)
 1458        {
 11459            SendMessage("BlockPlayer", new SendBlockPlayerPayload()
 1460            {
 1461                userId = userId
 1462            });
 11463        }
 1464
 1465        public static void SendUnblockPlayer(string userId)
 1466        {
 01467            SendMessage("UnblockPlayer", new SendUnblockPlayerPayload()
 1468            {
 1469                userId = userId
 1470            });
 01471        }
 1472
 1473        public static void RequestScenesInfoAroundParcel(Vector2 parcel, int maxScenesArea)
 1474        {
 51475            SendMessage("RequestScenesInfoInArea", new RequestScenesInfoAroundParcelPayload()
 1476            {
 1477                parcel = parcel,
 1478                scenesAround = maxScenesArea
 1479            });
 51480        }
 1481
 1482        public static void SendAudioStreamEvent(string url, bool play, float volume)
 1483        {
 201484            onAudioStreamingEvent.url = url;
 201485            onAudioStreamingEvent.play = play;
 201486            onAudioStreamingEvent.volume = volume;
 201487            SendMessage("SetAudioStream", onAudioStreamingEvent);
 201488        }
 1489
 21490        public static void JoinVoiceChat() { SendMessage("JoinVoiceChat"); }
 1491
 21492        public static void LeaveVoiceChat() { SendMessage("LeaveVoiceChat"); }
 1493
 1494        public static void SendSetVoiceChatRecording(bool recording)
 1495        {
 01496            setVoiceChatRecordingPayload.recording = recording;
 01497            SendMessage("SetVoiceChatRecording", setVoiceChatRecordingPayload);
 01498        }
 1499
 01500        public static void ToggleVoiceChatRecording() { SendMessage("ToggleVoiceChatRecording"); }
 1501
 1502        public static void ApplySettings(float voiceChatVolume, int voiceChatAllowCategory)
 1503        {
 61504            applySettingsPayload.voiceChatVolume = voiceChatVolume;
 61505            applySettingsPayload.voiceChatAllowCategory = voiceChatAllowCategory;
 61506            SendMessage("ApplySettings", applySettingsPayload);
 61507        }
 1508
 1509        public static void RequestGIFProcessor(string gifURL, string gifId, bool isWebGL1)
 1510        {
 01511            gifSetupPayload.imageSource = gifURL;
 01512            gifSetupPayload.id = gifId;
 01513            gifSetupPayload.isWebGL1 = isWebGL1;
 1514
 01515            SendMessage("RequestGIFProcessor", gifSetupPayload);
 01516        }
 1517
 1518        public static void DeleteGIF(string id)
 1519        {
 01520            stringPayload.value = id;
 01521            SendMessage("DeleteGIF", stringPayload);
 01522        }
 1523
 1524        public static void GoTo(int x, int y)
 1525        {
 01526            gotoEvent.x = x;
 01527            gotoEvent.y = y;
 01528            SendMessage("GoTo", gotoEvent);
 01529        }
 1530
 1531        public static void GoToCrowd()
 1532        {
 01533            SendMessage("GoToCrowd");
 01534        }
 1535
 1536        public static void GoToMagic()
 1537        {
 01538            SendMessage("GoToMagic");
 01539        }
 1540
 1541        public static void LoadingHUDReadyForTeleport(int x, int y)
 1542        {
 01543            gotoEvent.x = x;
 01544            gotoEvent.y = y;
 01545            SendMessage("LoadingHUDReadyForTeleport", gotoEvent);
 01546        }
 1547
 1548        public static void JumpIn(int x, int y, string serverName, string layerName)
 1549        {
 01550            jumpInPayload.realm.serverName = serverName;
 01551            jumpInPayload.realm.layer = layerName;
 1552
 01553            jumpInPayload.gridPosition.x = x;
 01554            jumpInPayload.gridPosition.y = y;
 1555
 01556            SendMessage("JumpIn", jumpInPayload);
 01557        }
 1558
 1559        public static void JumpInHome(string mostPopulatedRealm)
 1560        {
 01561            jumpInPayload.realm.serverName = mostPopulatedRealm;
 01562            SendMessage("JumpInHome", jumpInPayload);
 01563        }
 1564
 1565        public static void SendChatMessage(ChatMessage message)
 1566        {
 01567            sendChatMessageEvent.message = message;
 01568            SendMessage("SendChatMessage", sendChatMessageEvent);
 01569        }
 1570
 01571        public static void UpdateFriendshipStatus(FriendshipUpdateStatusMessage message) { SendMessage("UpdateFriendship
 1572
 01573        public static void ScenesLoadingFeedback(LoadingFeedbackMessage message) { SendMessage("ScenesLoadingFeedback", 
 1574
 01575        public static void FetchHotScenes() { SendMessage("FetchHotScenes"); }
 1576
 1577        public static void SetBaseResolution(int resolution)
 1578        {
 21579            baseResEvent.baseResolution = resolution;
 21580            SendMessage("SetBaseResolution", baseResEvent);
 21581        }
 1582
 01583        public static void ReportAnalyticsEvent(string eventName) { ReportAnalyticsEvent(eventName, null); }
 1584
 1585        public static void ReportAnalyticsEvent(string eventName, AnalyticsPayload.Property[] eventProperties)
 1586        {
 01587            analyticsEvent.name = eventName;
 01588            analyticsEvent.properties = eventProperties;
 01589            SendMessage("Track", analyticsEvent);
 01590        }
 1591
 41592        public static void FetchBalanceOfMANA() { SendMessage("FetchBalanceOfMANA"); }
 1593
 1594        public static void SendSceneExternalActionEvent(int sceneNumber, string type, string payload)
 1595        {
 01596            sceneExternalActionEvent.type = type;
 01597            sceneExternalActionEvent.payload = payload;
 01598            SendSceneEvent(sceneNumber, "externalAction", sceneExternalActionEvent);
 01599        }
 1600
 1601        public static void SetMuteUsers(string[] usersId, bool mute)
 1602        {
 41603            muteUserEvent.usersId = usersId;
 41604            muteUserEvent.mute = mute;
 41605            SendMessage("SetMuteUsers", muteUserEvent);
 41606        }
 1607
 1608        public static void SendCloseUserAvatar(bool isSignUpFlow)
 1609        {
 01610            closeUserAvatarPayload.isSignUpFlow = isSignUpFlow;
 01611            SendMessage("CloseUserAvatar", closeUserAvatarPayload);
 01612        }
 1613
 1614        // Warning: Use this method only for PEXs non-associated to smart wearables.
 1615        //          For PEX associated to smart wearables use 'SetDisabledPortableExperiences'.
 1616        public static void KillPortableExperience(string portableExperienceId)
 1617        {
 01618            killPortableExperiencePayload.portableExperienceId = portableExperienceId;
 01619            SendMessage("KillPortableExperience", killPortableExperiencePayload);
 01620        }
 1621
 1622        public static void RequestThirdPartyWearables(
 1623            string ownedByUser,
 1624            string thirdPartyCollectionId,
 1625            string context)
 1626        {
 11627            requestWearablesPayload.filters = new WearablesRequestFiltersPayload
 1628            {
 1629                ownedByUser = ownedByUser,
 1630                thirdPartyId = thirdPartyCollectionId,
 1631                collectionIds = null,
 1632                wearableIds = null
 1633            };
 1634
 11635            requestWearablesPayload.context = context;
 1636
 11637            SendMessage("RequestWearables", requestWearablesPayload);
 11638        }
 1639
 1640        public static void SetDisabledPortableExperiences(string[] idsToDisable)
 1641        {
 71642            setDisabledPortableExperiencesPayload.idsToDisable = idsToDisable;
 71643            SendMessage("SetDisabledPortableExperiences", setDisabledPortableExperiencesPayload);
 71644        }
 1645
 1646        public static void RequestWearables(
 1647            string ownedByUser,
 1648            string[] wearableIds,
 1649            string[] collectionIds,
 1650            string context)
 1651        {
 01652            requestWearablesPayload.filters = new WearablesRequestFiltersPayload
 1653            {
 1654                ownedByUser = ownedByUser,
 1655                wearableIds = wearableIds,
 1656                collectionIds = collectionIds,
 1657                thirdPartyId = null
 1658            };
 1659
 01660            requestWearablesPayload.context = context;
 1661
 01662            SendMessage("RequestWearables", requestWearablesPayload);
 01663        }
 1664
 1665        public static void RequestEmotes(
 1666            string ownedByUser,
 1667            string[] emoteIds,
 1668            string[] collectionIds,
 1669            string context)
 1670        {
 01671            requestEmotesPayload.filters = new EmotesRequestFiltersPayload()
 1672            {
 1673                ownedByUser = ownedByUser,
 1674                emoteIds = emoteIds,
 1675                collectionIds = collectionIds,
 1676                thirdPartyId = null
 1677            };
 1678
 01679            requestEmotesPayload.context = context;
 1680
 01681            SendMessage("RequestEmotes", requestEmotesPayload);
 01682        }
 1683
 1684        public static void SearchENSOwner(string name, int maxResults)
 1685        {
 41686            searchEnsOwnerPayload.name = name;
 41687            searchEnsOwnerPayload.maxResults = maxResults;
 1688
 41689            SendMessage("SearchENSOwner", searchEnsOwnerPayload);
 41690        }
 1691
 01692        public static void RequestHomeCoordinates() { SendMessage("RequestHomeCoordinates"); }
 1693
 1694        public static void RequestUserProfile(string userId)
 1695        {
 01696            stringPayload.value = userId;
 01697            SendMessage("RequestUserProfile", stringPayload);
 01698        }
 1699
 01700        public static void ReportAvatarFatalError(string payload) { SendJson("ReportAvatarFatalError", payload); }
 1701
 1702        public static void UnpublishScene(Vector2Int sceneCoordinates)
 1703        {
 01704            var payload = new UnpublishScenePayload() { coordinates = $"{sceneCoordinates.x},{sceneCoordinates.y}" };
 01705            SendMessage("UnpublishScene", payload);
 01706        }
 1707
 1708        public static void NotifyStatusThroughChat(string message)
 1709        {
 01710            stringPayload.value = message;
 01711            SendMessage("NotifyStatusThroughChat", stringPayload);
 01712        }
 1713
 1714        public static void ReportVideoProgressEvent(
 1715            string componentId,
 1716            int sceneNumber,
 1717            string videoClipId,
 1718            int videoStatus,
 1719            float currentOffset,
 1720            float length)
 1721        {
 451722            SendVideoProgressEvent progressEvent = new SendVideoProgressEvent()
 1723            {
 1724                componentId = componentId,
 1725                sceneNumber = sceneNumber,
 1726                videoTextureId = videoClipId,
 1727                status = videoStatus,
 1728                currentOffset = currentOffset,
 1729                videoLength = float.IsInfinity(length) ? float.MaxValue : length
 1730            };
 1731
 451732            SendMessage("VideoProgressEvent", progressEvent);
 451733        }
 1734
 1735        public static void ReportAvatarRemoved(string avatarId)
 1736        {
 01737            avatarStatePayload.type = "Removed";
 01738            avatarStatePayload.avatarShapeId = avatarId;
 01739            SendMessage("ReportAvatarState", avatarStatePayload);
 01740        }
 1741
 1742        public static void ReportAvatarSceneChanged(string avatarId, int sceneNumber)
 1743        {
 01744            avatarSceneChangedPayload.type = "SceneChanged";
 01745            avatarSceneChangedPayload.avatarShapeId = avatarId;
 01746            avatarSceneChangedPayload.sceneNumber = sceneNumber;
 01747            SendMessage("ReportAvatarState", avatarSceneChangedPayload);
 01748        }
 1749
 1750        public static void ReportAvatarClick(int sceneNumber, string userId, Vector3 rayOrigin, Vector3 rayDirection, fl
 1751        {
 01752            avatarOnClickPayload.userId = userId;
 01753            avatarOnClickPayload.ray.origin = rayOrigin;
 01754            avatarOnClickPayload.ray.direction = rayDirection;
 01755            avatarOnClickPayload.ray.distance = distance;
 1756
 01757            SendSceneEvent(sceneNumber, "playerClicked", avatarOnClickPayload);
 01758        }
 1759
 1760        public static void ReportOnPointerHoverEnterEvent(int sceneNumber, string uuid)
 1761        {
 41762            onPointerHoverEnterEvent.uuid = uuid;
 41763            SendSceneEvent(sceneNumber, "uuidEvent", onPointerHoverEnterEvent);
 41764        }
 1765
 1766        public static void ReportOnPointerHoverExitEvent(int sceneNumber, string uuid)
 1767        {
 11768            onPointerHoverExitEvent.uuid = uuid;
 11769            SendSceneEvent(sceneNumber, "uuidEvent", onPointerHoverExitEvent);
 11770        }
 1771
 1772        public static void ReportTime(float time, bool isPaused, float timeNormalizationFactor, float cycleTime)
 1773        {
 61774            timeReportPayload.time = time;
 61775            timeReportPayload.isPaused = isPaused;
 61776            timeReportPayload.timeNormalizationFactor = timeNormalizationFactor;
 61777            timeReportPayload.cycleTime = cycleTime;
 61778            SendMessage("ReportDecentralandTime", timeReportPayload);
 61779        }
 1780
 1781        public static void GetFriendsWithDirectMessages(string userNameOrId, int limit, int skip)
 1782        {
 01783            getFriendsWithDirectMessagesPayload.userNameOrId = userNameOrId;
 01784            getFriendsWithDirectMessagesPayload.limit = limit;
 01785            getFriendsWithDirectMessagesPayload.skip = skip;
 01786            SendMessage("GetFriendsWithDirectMessages", getFriendsWithDirectMessagesPayload);
 01787        }
 1788
 1789        public static void MarkMessagesAsSeen(string userId)
 1790        {
 01791            markMessagesAsSeenPayload.userId = userId;
 01792            SendMessage("MarkMessagesAsSeen", markMessagesAsSeenPayload);
 01793        }
 1794
 1795        public static void GetPrivateMessages(string userId, int limit, string fromMessageId)
 1796        {
 01797            getPrivateMessagesPayload.userId = userId;
 01798            getPrivateMessagesPayload.limit = limit;
 01799            getPrivateMessagesPayload.fromMessageId = fromMessageId;
 01800            SendMessage("GetPrivateMessages", getPrivateMessagesPayload);
 01801        }
 1802
 1803        public static void MarkChannelMessagesAsSeen(string channelId)
 1804        {
 01805            markChannelMessagesAsSeenPayload.channelId = channelId;
 01806            SendMessage("MarkChannelMessagesAsSeen", markChannelMessagesAsSeenPayload);
 01807        }
 1808
 01809        public static void GetUnseenMessagesByUser() { SendMessage("GetUnseenMessagesByUser"); }
 1810
 1811        public static void GetUnseenMessagesByChannel()
 1812        {
 01813            SendMessage("GetUnseenMessagesByChannel");
 01814        }
 1815
 1816        public static void GetFriends(int limit, int skip)
 1817        {
 01818            SendMessage("GetFriends", new GetFriendsPayload
 1819            {
 1820                limit = limit,
 1821                skip = skip
 1822            });
 01823        }
 1824
 1825        public static void GetFriends(string usernameOrId, int limit)
 1826        {
 01827            SendMessage("GetFriends", new GetFriendsPayload
 1828            {
 1829                userNameOrId = usernameOrId,
 1830                limit = limit
 1831            });
 01832        }
 1833
 1834        public static void LeaveChannel(string channelId)
 1835        {
 01836            SendMessage("LeaveChannel", new LeaveChannelPayload
 1837            {
 1838                channelId = channelId
 1839            });
 01840        }
 1841
 1842        public static void CreateChannel(string channelId)
 1843        {
 01844            SendMessage("CreateChannel", new CreateChannelPayload
 1845            {
 1846                channelId = channelId
 1847            });
 01848        }
 1849
 1850        public static void JoinOrCreateChannel(string channelId)
 1851        {
 01852            SendMessage("JoinOrCreateChannel", new JoinOrCreateChannelPayload
 1853            {
 1854                channelId = channelId
 1855            });
 01856        }
 1857
 1858        public static void GetChannelMessages(string channelId, int limit, string fromMessageId)
 1859        {
 01860            SendMessage("GetChannelMessages", new GetChannelMessagesPayload
 1861            {
 1862                channelId = channelId,
 1863                limit = limit,
 1864                from = fromMessageId
 1865            });
 01866        }
 1867
 1868        public static void GetJoinedChannels(int limit, int skip)
 1869        {
 01870            SendMessage("GetJoinedChannels", new GetJoinedChannelsPayload
 1871            {
 1872                limit = limit,
 1873                skip = skip
 1874            });
 01875        }
 1876
 1877        public static void GetChannels(int limit, string since, string name)
 1878        {
 01879            SendMessage("GetChannels", new GetChannelsPayload
 1880            {
 1881                limit = limit,
 1882                since = since,
 1883                name = name
 1884            });
 01885        }
 1886
 1887        public static void GetChannelInfo(string[] channelIds)
 1888        {
 01889            SendMessage("GetChannelInfo", new GetChannelInfoPayload
 1890            {
 1891                channelIds = channelIds
 1892            });
 01893        }
 1894
 1895        public static void GetChannelMembers(string channelId, int limit, int skip, string name)
 1896        {
 01897            SendMessage("GetChannelMembers", new GetChannelMembersPayload
 1898            {
 1899                channelId = channelId,
 1900                limit = limit,
 1901                skip = skip,
 1902                userName = name
 1903            });
 01904        }
 1905
 1906        public static void MuteChannel(string channelId, bool muted)
 1907        {
 01908            SendMessage("MuteChannel", new MuteChannelPayload
 1909            {
 1910                channelId = channelId,
 1911                muted = muted
 1912            });
 01913        }
 1914
 1915        public static void UpdateMemoryUsage()
 1916        {
 01917            SendMessage("UpdateMemoryUsage");
 01918        }
 1919
 01920        public static void RequestAudioDevices() => SendMessage("RequestAudioDevices");
 1921
 1922        public static void SetInputAudioDevice(string inputDeviceId)
 1923        {
 01924            SendMessage(nameof(SetInputAudioDevice), new SetInputAudioDevicePayload()
 1925            {
 1926                deviceId = inputDeviceId
 1927            });
 01928        }
 1929    }
 1930}

Methods/Properties

WebInterface()
SceneReady(System.Int32)
ActivateRenderingACK()
DeactivateRenderingACK()
OnGlobalPointerEvent()
StoreSceneStateEvent()
OnTextInputChangeTextEventPayload()
operator+(DCL.Interface.WebInterface/MetricsModel, DCL.Interface.WebInterface/MetricsModel)
OnMetricsUpdate()
TransformPayload()
SystemInfoReportPayload()
JumpInPayload()
Property(System.String, System.String)
HeadersPayload()
AvatarOnClickPayload()
OnMessageFromEngine(System.Action[String,String])
OnMessageFromEngine()
StartDecentraland()
CheckURLParam(System.String)
GetURLParam(System.String)
MessageFromEngine(System.String, System.String)
ProcessQueuedMessages()
GetGraphicCard()
SendMessage(System.String)
SendMessage[T](System.String, T)
SendJson(System.String, System.String)
SendSceneEvent[T](System.Int32, System.String, T)
SendAllScenesEvent[T](System.String, T)
ReportPosition(UnityEngine.Vector3, UnityEngine.Quaternion, System.Single, UnityEngine.Quaternion)
ReportCameraChanged(DCL.CameraTool.CameraMode/ModeId)
ReportCameraChanged(DCL.CameraTool.CameraMode/ModeId, System.Int32)
Web3UseResponse(System.String, System.Boolean)
ReportIdleStateChanged(System.Boolean)
ReportControlEvent[T](T)
SendRequestHeadersForUrl(System.String, System.String, System.String, System.Collections.Generic.Dictionary[String,Object])
BuilderInWorldMessage(System.String, System.String)
ReportOnClickEvent(System.Int32, System.String)
ReportRaycastResult[T, P](System.Int32, System.String, System.String, P)
ReportRaycastHitFirstResult(System.Int32, System.String, DCL.Models.RaycastType, DCL.Interface.WebInterface/RaycastHitEntity)
ReportRaycastHitAllResult(System.Int32, System.String, DCL.Models.RaycastType, DCL.Interface.WebInterface/RaycastHitEntities)
CreateHitObject(System.String, System.String, UnityEngine.Vector3, UnityEngine.Vector3, System.Single)
SetPointerEventPayload(DCL.Interface.WebInterface/OnPointerEventPayload, DCL.Interface.WebInterface/ACTION_BUTTON, System.String, System.String, UnityEngine.Ray, UnityEngine.Vector3, UnityEngine.Vector3, System.Single, System.Boolean)
ReportGlobalPointerDownEvent(DCL.Interface.WebInterface/ACTION_BUTTON, UnityEngine.Ray, UnityEngine.Vector3, UnityEngine.Vector3, System.Single, System.Int32, System.String, System.String, System.Boolean)
ReportGlobalPointerUpEvent(DCL.Interface.WebInterface/ACTION_BUTTON, UnityEngine.Ray, UnityEngine.Vector3, UnityEngine.Vector3, System.Single, System.Int32, System.String, System.String, System.Boolean)
ReportOnPointerDownEvent(DCL.Interface.WebInterface/ACTION_BUTTON, System.Int32, System.String, System.String, System.String, UnityEngine.Ray, UnityEngine.Vector3, UnityEngine.Vector3, System.Single)
ReportOnPointerUpEvent(DCL.Interface.WebInterface/ACTION_BUTTON, System.Int32, System.String, System.String, System.String, UnityEngine.Ray, UnityEngine.Vector3, UnityEngine.Vector3, System.Single)
ReportOnTextSubmitEvent(System.Int32, System.String, System.String)
ReportOnTextInputChangedEvent(System.Int32, System.String, System.String)
ReportOnTextInputChangedTextEvent(System.Int32, System.String, System.String, System.Boolean)
ReportOnFocusEvent(System.Int32, System.String)
ReportOnBlurEvent(System.Int32, System.String)
ReportOnScrollChange(System.Int32, System.String, UnityEngine.Vector2, System.Int32)
ReportEvent[T](System.Int32, T)
ReportOnMetricsUpdate(System.Int32, DCL.Interface.WebInterface/MetricsModel, DCL.Interface.WebInterface/MetricsModel)
ReportOnEnterEvent(System.Int32, System.String)
LogOut()
RedirectToSignUp()
PreloadFinished(System.Int32)
ReportMousePosition(UnityEngine.Vector3, System.String)
SendScreenshot(System.String, System.String)
SetDelightedSurveyEnabled(System.Boolean)
SetScenesLoadRadius(System.Single)
Guest()
WalletConnect()
SendSaveUserDescriptionPayload(System.String)
RequestOwnProfileUpdate()
SendSaveAvatar(AvatarModel, UnityEngine.Texture2D, UnityEngine.Texture2D, System.Boolean)
SendAuthentication(System.String)
SendPassport(System.String, System.String)
SendSaveUserUnverifiedName(System.String)
SendSaveUserDescription(System.String)
SendRequestUserProfile(System.String)
SendUserAcceptedCollectibles(System.String)
SaveUserTutorialStep(System.Int32)
SendPerformanceReport(System.String)
SendSystemInfoReport()
SendTermsOfServiceResponse(System.Int32, System.Boolean, System.Boolean)
OpenURL(System.String)
PublishStatefulScene(ProtocolV2/PublishPayload)
SendReportScene(System.Int32)
SetHomeScene(System.String)
SendReportPlayer(System.String, System.String)
SendBlockPlayer(System.String)
SendUnblockPlayer(System.String)
RequestScenesInfoAroundParcel(UnityEngine.Vector2, System.Int32)
SendAudioStreamEvent(System.String, System.Boolean, System.Single)
JoinVoiceChat()
LeaveVoiceChat()
SendSetVoiceChatRecording(System.Boolean)
ToggleVoiceChatRecording()
ApplySettings(System.Single, System.Int32)
RequestGIFProcessor(System.String, System.String, System.Boolean)
DeleteGIF(System.String)
GoTo(System.Int32, System.Int32)
GoToCrowd()
GoToMagic()
LoadingHUDReadyForTeleport(System.Int32, System.Int32)
JumpIn(System.Int32, System.Int32, System.String, System.String)
JumpInHome(System.String)
SendChatMessage(DCL.Interface.ChatMessage)
UpdateFriendshipStatus(DCL.Interface.WebInterface/FriendshipUpdateStatusMessage)
ScenesLoadingFeedback(DCL.Interface.WebInterface/LoadingFeedbackMessage)
FetchHotScenes()
SetBaseResolution(System.Int32)
ReportAnalyticsEvent(System.String)
ReportAnalyticsEvent(System.String, DCL.Interface.WebInterface/AnalyticsPayload/Property[])
FetchBalanceOfMANA()
SendSceneExternalActionEvent(System.Int32, System.String, System.String)
SetMuteUsers(System.String[], System.Boolean)
SendCloseUserAvatar(System.Boolean)
KillPortableExperience(System.String)
RequestThirdPartyWearables(System.String, System.String, System.String)
SetDisabledPortableExperiences(System.String[])
RequestWearables(System.String, System.String[], System.String[], System.String)
RequestEmotes(System.String, System.String[], System.String[], System.String)
SearchENSOwner(System.String, System.Int32)
RequestHomeCoordinates()
RequestUserProfile(System.String)
ReportAvatarFatalError(System.String)
UnpublishScene(UnityEngine.Vector2Int)
NotifyStatusThroughChat(System.String)
ReportVideoProgressEvent(System.String, System.Int32, System.String, System.Int32, System.Single, System.Single)
ReportAvatarRemoved(System.String)
ReportAvatarSceneChanged(System.String, System.Int32)
ReportAvatarClick(System.Int32, System.String, UnityEngine.Vector3, UnityEngine.Vector3, System.Single)
ReportOnPointerHoverEnterEvent(System.Int32, System.String)
ReportOnPointerHoverExitEvent(System.Int32, System.String)
ReportTime(System.Single, System.Boolean, System.Single, System.Single)
GetFriendsWithDirectMessages(System.String, System.Int32, System.Int32)
MarkMessagesAsSeen(System.String)
GetPrivateMessages(System.String, System.Int32, System.String)
MarkChannelMessagesAsSeen(System.String)
GetUnseenMessagesByUser()
GetUnseenMessagesByChannel()
GetFriends(System.Int32, System.Int32)
GetFriends(System.String, System.Int32)
LeaveChannel(System.String)
CreateChannel(System.String)
JoinOrCreateChannel(System.String)
GetChannelMessages(System.String, System.Int32, System.String)
GetJoinedChannels(System.Int32, System.Int32)
GetChannels(System.Int32, System.String, System.String)
GetChannelInfo(System.String[])
GetChannelMembers(System.String, System.Int32, System.Int32, System.String)
MuteChannel(System.String, System.Boolean)
UpdateMemoryUsage()
RequestAudioDevices()
SetInputAudioDevice(System.String)