< Summary

Class:DCL.Interface.WebInterface
Assembly:WebInterface
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WebInterface/Interface.cs
Covered lines:271
Uncovered lines:218
Coverable lines:489
Total lines:1956
Line coverage:55.4% (271 of 489)
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%2100%
StoreSceneStateEvent()0%110100%
OnTextInputChangeTextEventPayload()0%110100%
operator+(...)0%2100%
OnMetricsUpdate()0%110100%
TransformPayload()0%2100%
SystemInfoReportPayload()0%2100%
JumpInPayload()0%2100%
Property(...)0%2100%
HeadersPayload()0%110100%
AvatarOnClickPayload()0%2100%
StartDecentraland()0%2100%
CheckURLParam(...)0%2100%
GetURLParam(...)0%2100%
MessageFromEngine(...)0%5.395075%
ProcessQueuedMessages()0%330100%
GetGraphicCard()0%2100%
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%110100%
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%
SendUserAcceptedCollectibles(...)0%110100%
SaveUserTutorialStep(...)0%2100%
SendPerformanceReport(...)0%2100%
SendSystemInfoReport()0%2100%
SendTermsOfServiceResponse(...)0%110100%
SendExpression(...)0%110100%
OpenURL(...)0%110100%
PublishStatefulScene(...)0%110100%
StartIsolatedMode(...)0%110100%
StopIsolatedMode(...)0%110100%
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%
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%110100%
ReportAvatarFatalError(...)0%2100%
UnpublishScene(...)0%2100%
NotifyStatusThroughChat(...)0%2100%
ReportVideoProgressEvent(...)0%110100%
ReportAvatarRemoved(...)0%2100%
ReportAvatarSceneChanged(...)0%2100%
ReportAvatarClick(...)0%2100%
ReportOnPointerHoverEnterEvent(...)0%110100%
ReportOnPointerHoverExitEvent(...)0%110100%
ReportTime(...)0%110100%
GetFriendsWithDirectMessages(...)0%2100%
MarkMessagesAsSeen(...)0%110100%
GetPrivateMessages(...)0%2100%
MarkChannelMessagesAsSeen(...)0%110100%
GetUnseenMessagesByUser()0%2100%
GetUnseenMessagesByChannel()0%2100%
GetFriends(...)0%2100%
GetFriends(...)0%2100%
GetFriendRequests(...)0%2100%
LeaveChannel(...)0%2100%
CreateChannel(...)0%2100%
JoinOrCreateChannel(...)0%2100%
GetChannelMessages(...)0%2100%
GetJoinedChannels(...)0%2100%
GetChannels(...)0%110100%
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 Ray = UnityEngine.Ray;
 8
 9#if UNITY_WEBGL && !UNITY_EDITOR
 10using System.Runtime.InteropServices;
 11#endif
 12
 13namespace DCL.Interface
 14{
 15    /**
 16     * This class contains the outgoing interface of Decentraland.
 17     * You must call those functions to interact with the WebInterface.
 18     *
 19     * The messages comming from the WebInterface instead, are reported directly to
 20     * the handler GameObject by name.
 21     */
 22    public static class WebInterface
 23    {
 124        public static bool VERBOSE = false;
 25
 26        [System.Serializable]
 27        public class ReportPositionPayload
 28        {
 29            /** Camera position, world space */
 30            public Vector3 position;
 31
 32            /** Character rotation */
 33            public Quaternion rotation;
 34
 35            /** Camera rotation */
 36            public Quaternion cameraRotation;
 37
 38            /** Camera height, relative to the feet of the avatar or ground */
 39            public float playerHeight;
 40
 41            public Vector3 mousePosition;
 42
 43            public string id;
 44        }
 45
 46        [System.Serializable]
 47        public abstract class ControlEvent
 48        {
 49            public string eventType;
 50        }
 51
 52        public abstract class ControlEvent<T> : ControlEvent
 53        {
 54            public T payload;
 55
 56            protected ControlEvent(string eventType, T payload)
 57            {
 58                this.eventType = eventType;
 59                this.payload = payload;
 60            }
 61        }
 62
 63        [System.Serializable]
 64        public class SceneReady : ControlEvent<SceneReady.Payload>
 65        {
 66
 83067            public SceneReady(string sceneId) : base("SceneReady", new Payload() { sceneId = sceneId }) { }
 68
 69            [System.Serializable]
 70            public class Payload
 71            {
 72                public string sceneId;
 73            }
 74        }
 75
 76        [System.Serializable]
 77        public class ActivateRenderingACK : ControlEvent<object>
 78        {
 079            public ActivateRenderingACK() : base("ActivateRenderingACK", null) { }
 80        }
 81
 82        [System.Serializable]
 83        public class DeactivateRenderingACK : ControlEvent<object>
 84        {
 085            public DeactivateRenderingACK() : base("DeactivateRenderingACK", null) { }
 86        }
 87
 88        [System.Serializable]
 89        public class SceneEvent<T>
 90        {
 91            public string sceneId;
 92            public string eventType;
 93            public T payload;
 94        }
 95
 96        [System.Serializable]
 97        public class AllScenesEvent<T>
 98        {
 99            public string eventType;
 100            public T payload;
 101        }
 102
 103        [System.Serializable]
 104        public class UUIDEvent<TPayload>
 105            where TPayload : class, new()
 106        {
 107            public string uuid;
 108            public TPayload payload = new TPayload();
 109        }
 110
 111        public enum ACTION_BUTTON
 112        {
 113            POINTER = 0,
 114            PRIMARY = 1,
 115            SECONDARY = 2,
 116            ANY = 3,
 117            FORWARD = 4,
 118            BACKWARD = 5,
 119            RIGHT = 6,
 120            LEFT = 7,
 121            JUMP = 8,
 122            WALK = 9,
 123            ACTION_3 = 10,
 124            ACTION_4 = 11,
 125            ACTION_5 = 12,
 126            ACTION_6 = 13
 127        }
 128
 129        [System.Serializable]
 130        public class OnClickEvent : UUIDEvent<OnClickEventPayload> { };
 131
 132        [System.Serializable]
 133        public class CameraModePayload
 134        {
 135            public CameraMode.ModeId cameraMode;
 136        };
 137
 138        [System.Serializable]
 139        public class Web3UseResponsePayload
 140        {
 141            public string id;
 142            public bool result;
 143        };
 144
 145        [System.Serializable]
 146        public class IdleStateChangedPayload
 147        {
 148            public bool isIdle;
 149        };
 150
 151        [System.Serializable]
 152        public class OnPointerDownEvent : UUIDEvent<OnPointerEventPayload> { };
 153
 154        [System.Serializable]
 155        public class OnGlobalPointerEvent
 156        {
 0157            public OnGlobalPointerEventPayload payload = new OnGlobalPointerEventPayload();
 158        };
 159
 160        [System.Serializable]
 161        public class OnPointerUpEvent : UUIDEvent<OnPointerEventPayload> { };
 162
 163        [System.Serializable]
 164        private class OnTextSubmitEvent : UUIDEvent<OnTextSubmitEventPayload> { };
 165
 166        [System.Serializable]
 167        private class OnTextInputChangeEvent : UUIDEvent<OnTextInputChangeEventPayload> { };
 168
 169        [System.Serializable]
 170        private class OnTextInputChangeTextEvent : UUIDEvent<OnTextInputChangeTextEventPayload> { };
 171
 172        [System.Serializable]
 173        private class OnScrollChangeEvent : UUIDEvent<OnScrollChangeEventPayload> { };
 174
 175        [System.Serializable]
 176        private class OnFocusEvent : UUIDEvent<EmptyPayload> { };
 177
 178        [System.Serializable]
 179        private class OnBlurEvent : UUIDEvent<EmptyPayload> { };
 180
 181        [System.Serializable]
 182        public class OnEnterEvent : UUIDEvent<OnEnterEventPayload> { };
 183
 184        [System.Serializable]
 185        public class OnClickEventPayload
 186        {
 187            public ACTION_BUTTON buttonId = ACTION_BUTTON.POINTER;
 188        }
 189
 190        [System.Serializable]
 191        public class SendChatMessageEvent
 192        {
 193            public ChatMessage message;
 194        }
 195
 196        [System.Serializable]
 197        public class RemoveEntityComponentsPayLoad
 198        {
 199            public string entityId;
 200            public string componentId;
 201        };
 202
 203        [System.Serializable]
 204        public class StoreSceneStateEvent
 205        {
 1206            public string type = "StoreSceneState";
 1207            public string payload = "";
 208        };
 209
 210        [System.Serializable]
 211        public class OnPointerEventPayload
 212        {
 213
 214            public ACTION_BUTTON buttonId;
 215            public Vector3 origin;
 216            public Vector3 direction;
 217            public Hit hit;
 218
 219            [System.Serializable]
 220            public class Hit
 221            {
 222                public Vector3 origin;
 223                public float length;
 224                public Vector3 hitPoint;
 225                public Vector3 normal;
 226                public Vector3 worldNormal;
 227                public string meshName;
 228                public string entityId;
 229            }
 230        }
 231
 232        [System.Serializable]
 233        public class OnGlobalPointerEventPayload : OnPointerEventPayload
 234        {
 235            public enum InputEventType
 236            {
 237                DOWN,
 238                UP
 239            }
 240
 241            public InputEventType type;
 242        }
 243
 244        [System.Serializable]
 245        public class OnTextSubmitEventPayload
 246        {
 247            public string id;
 248            public string text;
 249        }
 250
 251        [System.Serializable]
 252        public class OnTextInputChangeEventPayload
 253        {
 254            public string value;
 255        }
 256
 257        [System.Serializable]
 258        public class OnTextInputChangeTextEventPayload
 259        {
 260
 2261            public Payload value = new Payload();
 262
 263            [System.Serializable]
 264            public class Payload
 265            {
 266                public string value;
 267                public bool isSubmit;
 268            }
 269        }
 270
 271        [System.Serializable]
 272        public class OnScrollChangeEventPayload
 273        {
 274            public Vector2 value;
 275            public int pointerId;
 276        }
 277
 278        [System.Serializable]
 279        public class EmptyPayload { }
 280
 281        [System.Serializable]
 282        public class MetricsModel
 283        {
 284            public int meshes;
 285            public int bodies;
 286            public int materials;
 287            public int textures;
 288            public int triangles;
 289            public int entities;
 290
 291            public static MetricsModel operator +(MetricsModel lhs, MetricsModel rhs)
 292            {
 0293                return new MetricsModel()
 294                {
 295                    meshes = lhs.meshes + rhs.meshes,
 296                    bodies = lhs.bodies + rhs.bodies,
 297                    materials = lhs.materials + rhs.materials,
 298                    textures = lhs.textures + rhs.textures,
 299                    triangles = lhs.triangles + rhs.triangles,
 300                    entities = lhs.entities + rhs.entities
 301                };
 302            }
 303        }
 304
 305        [System.Serializable]
 306        private class OnMetricsUpdate
 307        {
 1308            public MetricsModel given = new MetricsModel();
 1309            public MetricsModel limit = new MetricsModel();
 310        }
 311
 312        [System.Serializable]
 313        public class OnEnterEventPayload { }
 314
 315        [System.Serializable]
 316        public class TransformPayload
 317        {
 0318            public Vector3 position = Vector3.zero;
 0319            public Quaternion rotation = Quaternion.identity;
 0320            public Vector3 scale = Vector3.one;
 321        }
 322
 323        public class OnSendScreenshot
 324        {
 325            public string encodedTexture;
 326            public string id;
 327        };
 328
 329        [System.Serializable]
 330        public class GotoEvent
 331        {
 332            public int x;
 333            public int y;
 334        };
 335
 336        [System.Serializable]
 337        public class BaseResolution
 338        {
 339            public int baseResolution;
 340        };
 341
 342        //-----------------------------------------------------
 343        // Raycast
 344        [System.Serializable]
 345        public class RayInfo
 346        {
 347            public Vector3 origin;
 348            public Vector3 direction;
 349            public float distance;
 350        }
 351
 352        [System.Serializable]
 353        public class RaycastHitInfo
 354        {
 355            public bool didHit;
 356            public RayInfo ray;
 357
 358            public Vector3 hitPoint;
 359            public Vector3 hitNormal;
 360        }
 361
 362        [System.Serializable]
 363        public class HitEntityInfo
 364        {
 365            public string entityId;
 366            public string meshName;
 367        }
 368
 369        [System.Serializable]
 370        public class RaycastHitEntity : RaycastHitInfo
 371        {
 372            public HitEntityInfo entity;
 373        }
 374
 375        [System.Serializable]
 376        public class RaycastHitEntities : RaycastHitInfo
 377        {
 378            public RaycastHitEntity[] entities;
 379        }
 380
 381        [System.Serializable]
 382        public class RaycastResponse<T> where T : RaycastHitInfo
 383        {
 384            public string queryId;
 385            public string queryType;
 386            public T payload;
 387        }
 388
 389        // Note (Zak): We need to explicitly define this classes for the JsonUtility to
 390        // be able to serialize them
 391        [System.Serializable]
 392        public class RaycastHitFirstResponse : RaycastResponse<RaycastHitEntity> { }
 393
 394        [System.Serializable]
 395        public class RaycastHitAllResponse : RaycastResponse<RaycastHitEntities> { }
 396
 397        [System.Serializable]
 398        public class SendExpressionPayload
 399        {
 400            public string id;
 401            public long timestamp;
 402        }
 403
 404        [System.Serializable]
 405        public class UserAcceptedCollectiblesPayload
 406        {
 407            public string id;
 408        }
 409
 410        [System.Serializable]
 411        public class SendBlockPlayerPayload
 412        {
 413            public string userId;
 414        }
 415
 416        [Serializable]
 417        private class SendReportPlayerPayload
 418        {
 419            public string userId;
 420            public string name;
 421        }
 422
 423        [Serializable]
 424        private class SendReportScenePayload
 425        {
 426            public string sceneId;
 427        }
 428
 429        [Serializable]
 430        private class SetHomeScenePayload
 431        {
 432            public string sceneId;
 433        }
 434
 435        [System.Serializable]
 436        public class SendUnblockPlayerPayload
 437        {
 438            public string userId;
 439        }
 440
 441        [System.Serializable]
 442        public class TutorialStepPayload
 443        {
 444            public int tutorialStep;
 445        }
 446
 447        [System.Serializable]
 448        public class PerformanceReportPayload
 449        {
 450            public string samples;
 451            public bool fpsIsCapped;
 452            public int hiccupsInThousandFrames;
 453            public float hiccupsTime;
 454            public float totalTime;
 455            public int gltfInProgress;
 456            public int gltfFailed;
 457            public int gltfCancelled;
 458            public int gltfLoaded;
 459            public int abInProgress;
 460            public int abFailed;
 461            public int abCancelled;
 462            public int abLoaded;
 463            public int gltfTexturesLoaded;
 464            public int abTexturesLoaded;
 465            public int promiseTexturesLoaded;
 466            public int enqueuedMessages;
 467            public int processedMessages;
 468            public int playerCount;
 469            public int loadRadius;
 470            public object drawCalls; //int *
 471            public object memoryReserved; //long, in total bytes *
 472            public object memoryUsage; //long, in total bytes *
 473            public object totalGCAlloc; //long, in total bytes, its the sum of all GCAllocs per frame over 1000 frames *
 474            public Dictionary<string, long> sceneScores;
 475
 476            //* is NULL if SendProfilerMetrics is false
 477        }
 478
 479        [System.Serializable]
 480        public class SystemInfoReportPayload
 481        {
 0482            public string graphicsDeviceName = SystemInfo.graphicsDeviceName;
 0483            public string graphicsDeviceVersion = SystemInfo.graphicsDeviceVersion;
 0484            public int graphicsMemorySize = SystemInfo.graphicsMemorySize;
 0485            public string processorType = SystemInfo.processorType;
 0486            public int processorCount = SystemInfo.processorCount;
 0487            public int systemMemorySize = SystemInfo.systemMemorySize;
 488
 489            // TODO: remove useBinaryTransform after ECS7 is fully in prod
 0490            public bool useBinaryTransform = true;
 491        }
 492
 493        [System.Serializable]
 494        public class GenericAnalyticPayload
 495        {
 496            public string eventName;
 497            public Dictionary<object, object> data;
 498        }
 499
 500        [System.Serializable]
 501        public class PerformanceHiccupPayload
 502        {
 503            public int hiccupsInThousandFrames;
 504            public float hiccupsTime;
 505            public float totalTime;
 506        }
 507
 508        [System.Serializable]
 509        public class TermsOfServiceResponsePayload
 510        {
 511            public string sceneId;
 512            public bool dontShowAgain;
 513            public bool accepted;
 514        }
 515
 516        [System.Serializable]
 517        public class OpenURLPayload
 518        {
 519            public string url;
 520        }
 521
 522        [System.Serializable]
 523        public class GIFSetupPayload
 524        {
 525            public string imageSource;
 526            public string id;
 527            public bool isWebGL1;
 528        }
 529
 530        [System.Serializable]
 531        public class RequestScenesInfoAroundParcelPayload
 532        {
 533            public Vector2 parcel;
 534            public int scenesAround;
 535        }
 536
 537        [System.Serializable]
 538        public class AudioStreamingPayload
 539        {
 540            public string url;
 541            public bool play;
 542            public float volume;
 543        }
 544
 545        [System.Serializable]
 546        public class SetScenesLoadRadiusPayload
 547        {
 548            public float newRadius;
 549        }
 550
 551        [System.Serializable]
 552        public class SetVoiceChatRecordingPayload
 553        {
 554            public bool recording;
 555        }
 556
 557        [System.Serializable]
 558        public class ApplySettingsPayload
 559        {
 560            public float voiceChatVolume;
 561            public int voiceChatAllowCategory;
 562        }
 563
 564        [Serializable]
 565        public class UserRealmPayload
 566        {
 567            public string serverName;
 568            public string layer;
 569        }
 570
 571        [System.Serializable]
 572        public class JumpInPayload
 573        {
 0574            public UserRealmPayload realm = new UserRealmPayload();
 575            public Vector2 gridPosition;
 576        }
 577
 578        [System.Serializable]
 579        public class LoadingFeedbackMessage
 580        {
 581            public string message;
 582            public int loadPercentage;
 583        }
 584
 585        [System.Serializable]
 586        public class AnalyticsPayload
 587        {
 588
 589            public string name;
 590            public Property[] properties;
 591
 592            [System.Serializable]
 593            public class Property
 594            {
 595                public string key;
 596                public string value;
 597
 0598                public Property(string key, string value)
 599                {
 0600                    this.key = key;
 0601                    this.value = value;
 0602                }
 603            }
 604        }
 605
 606        [System.Serializable]
 607        public class DelightedSurveyEnabledPayload
 608        {
 609            public bool enabled;
 610        }
 611
 612        [System.Serializable]
 613        public class ExternalActionSceneEventPayload
 614        {
 615            public string type;
 616            public string payload;
 617        }
 618
 619        [System.Serializable]
 620        public class MuteUserPayload
 621        {
 622            public string[] usersId;
 623            public bool mute;
 624        }
 625
 626        [System.Serializable]
 627        public class CloseUserAvatarPayload
 628        {
 629            public bool isSignUpFlow;
 630        }
 631
 632        [System.Serializable]
 633        public class StringPayload
 634        {
 635            public string value;
 636        }
 637
 638        [System.Serializable]
 639        public class KillPortableExperiencePayload
 640        {
 641            public string portableExperienceId;
 642        }
 643
 644        [System.Serializable]
 645        public class SetDisabledPortableExperiencesPayload
 646        {
 647            public string[] idsToDisable;
 648        }
 649
 650        [System.Serializable]
 651        public class WearablesRequestFiltersPayload
 652        {
 653            public string ownedByUser;
 654            public string[] wearableIds;
 655            public string[] collectionIds;
 656            public string thirdPartyId;
 657        }
 658
 659        [System.Serializable]
 660        public class EmotesRequestFiltersPayload
 661        {
 662            public string ownedByUser;
 663            public string[] emoteIds;
 664            public string[] collectionIds;
 665            public string thirdPartyId;
 666        }
 667
 668        [System.Serializable]
 669        public class RequestWearablesPayload
 670        {
 671            public WearablesRequestFiltersPayload filters;
 672            public string context;
 673        }
 674
 675        [System.Serializable]
 676        public class RequestEmotesPayload
 677        {
 678            public EmotesRequestFiltersPayload filters;
 679            public string context;
 680        }
 681
 682        [System.Serializable]
 683        public class HeadersPayload
 684        {
 685            public string method;
 686            public string url;
 1687            public Dictionary<string, object> metadata = new Dictionary<string, object>();
 688        }
 689
 690        [System.Serializable]
 691        public class SearchENSOwnerPayload
 692        {
 693            public string name;
 694            public int maxResults;
 695        }
 696
 697        [System.Serializable]
 698        public class UnpublishScenePayload
 699        {
 700            public string coordinates;
 701        }
 702
 703        [System.Serializable]
 704        public class AvatarStateBase
 705        {
 706            public string type;
 707            public string avatarShapeId;
 708        }
 709
 710        [System.Serializable]
 711        public class AvatarStateSceneChanged : AvatarStateBase
 712        {
 713            public string sceneId;
 714        }
 715
 716        [System.Serializable]
 717        public class AvatarOnClickPayload
 718        {
 719            public string userId;
 0720            public RayInfo ray = new RayInfo();
 721        }
 722
 723        [System.Serializable]
 724        public class TimeReportPayload
 725        {
 726            public float timeNormalizationFactor;
 727            public float cycleTime;
 728            public bool isPaused;
 729            public float time;
 730        }
 731
 732        [System.Serializable]
 733        public class GetFriendsWithDirectMessagesPayload
 734        {
 735            public string userNameOrId;
 736            public int limit;
 737            public int skip;
 738        }
 739
 740        [System.Serializable]
 741        public class MarkMessagesAsSeenPayload
 742        {
 743            public string userId;
 744        }
 745
 746        [System.Serializable]
 747        public class MarkChannelMessagesAsSeenPayload
 748        {
 749            public string channelId;
 750        }
 751
 752        [System.Serializable]
 753        public class GetPrivateMessagesPayload
 754        {
 755            public string userId;
 756            public int limit;
 757            public string fromMessageId;
 758        }
 759
 760        [Serializable]
 761        public class FriendshipUpdateStatusMessage
 762        {
 763            public string userId;
 764            public FriendshipAction action;
 765        }
 766
 767        [Serializable]
 768        public class SetInputAudioDevicePayload
 769        {
 770            public string deviceId;
 771        }
 772
 773        public enum FriendshipAction
 774        {
 775            NONE,
 776            APPROVED,
 777            REJECTED,
 778            CANCELLED,
 779            REQUESTED_FROM,
 780            REQUESTED_TO,
 781            DELETED
 782        }
 783
 784        [Serializable]
 785        private class GetFriendsPayload
 786        {
 787            public string userNameOrId;
 788            public int limit;
 789            public int skip;
 790        }
 791
 792        [Serializable]
 793        private class GetFriendRequestsPayload
 794        {
 795            public int sentLimit;
 796            public int sentSkip;
 797            public int receivedLimit;
 798            public int receivedSkip;
 799        }
 800
 801        [Serializable]
 802        private class LeaveChannelPayload
 803        {
 804            public string channelId;
 805        }
 806
 807        [Serializable]
 808        private class CreateChannelPayload
 809        {
 810            public string channelId;
 811        }
 812
 813        public struct MuteChannelPayload
 814        {
 815            public string channelId;
 816            public bool muted;
 817        }
 818
 819        [Serializable]
 820        private class JoinOrCreateChannelPayload
 821        {
 822            public string channelId;
 823        }
 824
 825        [Serializable]
 826        private class GetChannelMessagesPayload
 827        {
 828            public string channelId;
 829            public int limit;
 830            public string from;
 831        }
 832
 833        [Serializable]
 834        private class GetJoinedChannelsPayload
 835        {
 836            public int limit;
 837            public int skip;
 838        }
 839
 840        [Serializable]
 841        private class GetChannelsPayload
 842        {
 843            public int limit;
 844            public string since;
 845            public string name;
 846        }
 847
 848        [Serializable]
 849        private class GetChannelInfoPayload
 850        {
 851            public string[] channelIds;
 852        }
 853
 854        [Serializable]
 855        private class GetChannelMembersPayload
 856        {
 857            public string channelId;
 858            public int limit;
 859            public int skip;
 860            public string userName;
 861        }
 862
 863        public static event Action<string, byte[]> OnBinaryMessageFromEngine;
 864
 865#if UNITY_WEBGL && !UNITY_EDITOR
 866    /**
 867     * This method is called after the first render. It marks the loading of the
 868     * rest of the JS client.
 869     */
 870    [DllImport("__Internal")] public static extern void StartDecentraland();
 871    [DllImport("__Internal")] public static extern void MessageFromEngine(string type, string message);
 872    [DllImport("__Internal")] public static extern string GetGraphicCard();
 873    [DllImport("__Internal")] public static extern void BinaryMessageFromEngine(string sceneId, byte[] bytes, int size);
 874
 875    public static System.Action<string, string> OnMessageFromEngine;
 876#else
 877        public static Action<string, string> OnMessageFromEngine
 878        {
 879            set
 880            {
 82881                OnMessage = value;
 82882                if (OnMessage != null)
 883                {
 41884                    ProcessQueuedMessages();
 885                }
 82886            }
 0887            get => OnMessage;
 888        }
 889        private static Action<string, string> OnMessage;
 890
 1891        private static bool hasQueuedMessages = false;
 1892        private static List<(string, string)> queuedMessages = new List<(string, string)>();
 0893        public static void StartDecentraland() { }
 0894        public static bool CheckURLParam(string targetParam) { return false; }
 0895        public static string GetURLParam(string targetParam) { return String.Empty; }
 896
 897        public static void MessageFromEngine(string type, string message)
 898        {
 3642899            if (OnMessageFromEngine != null)
 900            {
 1839901                if (hasQueuedMessages)
 902                {
 0903                    ProcessQueuedMessages();
 904                }
 905
 1839906                OnMessageFromEngine.Invoke(type, message);
 1839907                if (VERBOSE)
 908                {
 0909                    Debug.Log("MessageFromEngine called with: " + type + ", " + message);
 910                }
 0911            }
 912            else
 913            {
 1803914                lock (queuedMessages)
 915                {
 1803916                    queuedMessages.Add((type, message));
 1803917                }
 918
 1803919                hasQueuedMessages = true;
 920            }
 3642921        }
 922
 923        private static void ProcessQueuedMessages()
 924        {
 41925            hasQueuedMessages = false;
 41926            lock (queuedMessages)
 927            {
 3636928                foreach ((string type, string payload) in queuedMessages)
 929                {
 1777930                    MessageFromEngine(type, payload);
 931                }
 932
 41933                queuedMessages.Clear();
 41934            }
 41935        }
 936
 0937        public static string GetGraphicCard() => "In Editor Graphic Card";
 938#endif
 939
 940        public static void SendMessage(string type)
 941        {
 942            // sending an empty JSON object to be compatible with other messages
 5943            MessageFromEngine(type, "{}");
 5944        }
 945
 946        public static void SendMessage<T>(string type, T message)
 947        {
 1846948            string messageJson = JsonUtility.ToJson(message);
 1846949            SendJson(type, messageJson);
 1846950        }
 951
 952        public static void SendJson(string type, string json)
 953        {
 1846954            if (VERBOSE)
 955            {
 0956                Debug.Log($"Sending message: " + json);
 957            }
 958
 1846959            MessageFromEngine(type, json);
 1846960        }
 961
 1962        private static ReportPositionPayload positionPayload = new ReportPositionPayload();
 1963        private static CameraModePayload cameraModePayload = new CameraModePayload();
 1964        private static Web3UseResponsePayload web3UseResponsePayload = new Web3UseResponsePayload();
 1965        private static IdleStateChangedPayload idleStateChangedPayload = new IdleStateChangedPayload();
 1966        private static OnMetricsUpdate onMetricsUpdate = new OnMetricsUpdate();
 1967        private static OnClickEvent onClickEvent = new OnClickEvent();
 1968        private static OnPointerDownEvent onPointerDownEvent = new OnPointerDownEvent();
 1969        private static OnPointerUpEvent onPointerUpEvent = new OnPointerUpEvent();
 1970        private static OnTextSubmitEvent onTextSubmitEvent = new OnTextSubmitEvent();
 1971        private static OnTextInputChangeEvent onTextInputChangeEvent = new OnTextInputChangeEvent();
 1972        private static OnTextInputChangeTextEvent onTextInputChangeTextEvent = new OnTextInputChangeTextEvent();
 1973        private static OnScrollChangeEvent onScrollChangeEvent = new OnScrollChangeEvent();
 1974        private static OnFocusEvent onFocusEvent = new OnFocusEvent();
 1975        private static OnBlurEvent onBlurEvent = new OnBlurEvent();
 1976        private static OnEnterEvent onEnterEvent = new OnEnterEvent();
 1977        private static OnSendScreenshot onSendScreenshot = new OnSendScreenshot();
 1978        private static OnPointerEventPayload onPointerEventPayload = new OnPointerEventPayload();
 1979        private static OnGlobalPointerEventPayload onGlobalPointerEventPayload = new OnGlobalPointerEventPayload();
 1980        private static OnGlobalPointerEvent onGlobalPointerEvent = new OnGlobalPointerEvent();
 1981        private static AudioStreamingPayload onAudioStreamingEvent = new AudioStreamingPayload();
 1982        private static SetVoiceChatRecordingPayload setVoiceChatRecordingPayload = new SetVoiceChatRecordingPayload();
 1983        private static SetScenesLoadRadiusPayload setScenesLoadRadiusPayload = new SetScenesLoadRadiusPayload();
 1984        private static ApplySettingsPayload applySettingsPayload = new ApplySettingsPayload();
 1985        private static GIFSetupPayload gifSetupPayload = new GIFSetupPayload();
 1986        private static JumpInPayload jumpInPayload = new JumpInPayload();
 1987        private static GotoEvent gotoEvent = new GotoEvent();
 1988        private static SendChatMessageEvent sendChatMessageEvent = new SendChatMessageEvent();
 1989        private static BaseResolution baseResEvent = new BaseResolution();
 1990        private static AnalyticsPayload analyticsEvent = new AnalyticsPayload();
 1991        private static DelightedSurveyEnabledPayload delightedSurveyEnabled = new DelightedSurveyEnabledPayload();
 1992        private static ExternalActionSceneEventPayload sceneExternalActionEvent = new ExternalActionSceneEventPayload();
 1993        private static MuteUserPayload muteUserEvent = new MuteUserPayload();
 1994        private static StoreSceneStateEvent storeSceneState = new StoreSceneStateEvent();
 1995        private static CloseUserAvatarPayload closeUserAvatarPayload = new CloseUserAvatarPayload();
 1996        private static StringPayload stringPayload = new StringPayload();
 1997        private static KillPortableExperiencePayload killPortableExperiencePayload = new KillPortableExperiencePayload()
 1998        private static SetDisabledPortableExperiencesPayload setDisabledPortableExperiencesPayload = new SetDisabledPort
 1999        private static RequestWearablesPayload requestWearablesPayload = new RequestWearablesPayload();
 11000        private static RequestEmotesPayload requestEmotesPayload = new RequestEmotesPayload();
 11001        private static SearchENSOwnerPayload searchEnsOwnerPayload = new SearchENSOwnerPayload();
 11002        private static HeadersPayload headersPayload = new HeadersPayload();
 11003        private static AvatarStateBase avatarStatePayload = new AvatarStateBase();
 11004        private static AvatarStateSceneChanged avatarSceneChangedPayload = new AvatarStateSceneChanged();
 11005        public static AvatarOnClickPayload avatarOnClickPayload = new AvatarOnClickPayload();
 11006        private static UUIDEvent<EmptyPayload> onPointerHoverEnterEvent = new UUIDEvent<EmptyPayload>();
 11007        private static UUIDEvent<EmptyPayload> onPointerHoverExitEvent = new UUIDEvent<EmptyPayload>();
 11008        private static TimeReportPayload timeReportPayload = new TimeReportPayload();
 11009        private static GetFriendsWithDirectMessagesPayload getFriendsWithDirectMessagesPayload = new GetFriendsWithDirec
 11010        private static MarkMessagesAsSeenPayload markMessagesAsSeenPayload = new MarkMessagesAsSeenPayload();
 11011        private static MarkChannelMessagesAsSeenPayload markChannelMessagesAsSeenPayload = new MarkChannelMessagesAsSeen
 11012        private static GetPrivateMessagesPayload getPrivateMessagesPayload = new GetPrivateMessagesPayload();
 1013
 1014        public static void SendSceneEvent<T>(string sceneId, string eventType, T payload)
 1015        {
 6431016            SceneEvent<T> sceneEvent = new SceneEvent<T>();
 6431017            sceneEvent.sceneId = sceneId;
 6431018            sceneEvent.eventType = eventType;
 6431019            sceneEvent.payload = payload;
 1020
 6431021            SendMessage("SceneEvent", sceneEvent);
 6431022        }
 1023
 1024        private static void SendAllScenesEvent<T>(string eventType, T payload)
 1025        {
 6051026            AllScenesEvent<T> allScenesEvent = new AllScenesEvent<T>();
 6051027            allScenesEvent.eventType = eventType;
 6051028            allScenesEvent.payload = payload;
 1029
 6051030            SendMessage("AllScenesEvent", allScenesEvent);
 6051031        }
 1032
 1033        public static void ReportPosition(Vector3 position, Quaternion rotation, float playerHeight, Quaternion cameraRo
 1034        {
 461035            positionPayload.position = position;
 461036            positionPayload.rotation = rotation;
 461037            positionPayload.playerHeight = playerHeight;
 461038            positionPayload.cameraRotation = cameraRotation;
 1039
 461040            SendMessage("ReportPosition", positionPayload);
 461041        }
 1042
 12081043        public static void ReportCameraChanged(CameraMode.ModeId cameraMode) { ReportCameraChanged(cameraMode, null); }
 1044
 1045        public static void ReportCameraChanged(CameraMode.ModeId cameraMode, string targetSceneId)
 1046        {
 10191047            cameraModePayload.cameraMode = cameraMode;
 10191048            if (!string.IsNullOrEmpty(targetSceneId))
 1049            {
 4151050                SendSceneEvent(targetSceneId, "cameraModeChanged", cameraModePayload);
 4151051            }
 1052            else
 1053            {
 6041054                SendAllScenesEvent("cameraModeChanged", cameraModePayload);
 1055            }
 6041056        }
 1057
 1058        public static void Web3UseResponse(string id, bool result)
 1059        {
 01060            web3UseResponsePayload.id = id;
 01061            web3UseResponsePayload.result = result;
 01062            SendMessage("Web3UseResponse", web3UseResponsePayload);
 01063        }
 1064
 1065        public static void ReportIdleStateChanged(bool isIdle)
 1066        {
 11067            idleStateChangedPayload.isIdle = isIdle;
 11068            SendAllScenesEvent("idleStateChanged", idleStateChangedPayload);
 11069        }
 1070
 8301071        public static void ReportControlEvent<T>(T controlEvent) where T : ControlEvent { SendMessage("ControlEvent", co
 1072
 1073        public static void SendRequestHeadersForUrl(string eventName, string method, string url, Dictionary<string, obje
 1074        {
 01075            headersPayload.method = method;
 01076            headersPayload.url = url;
 01077            if (metadata != null)
 01078                headersPayload.metadata = metadata;
 01079            SendMessage(eventName, headersPayload);
 01080        }
 1081
 81082        public static void BuilderInWorldMessage(string type, string message) { MessageFromEngine(type, message); }
 1083
 1084        public static void ReportOnClickEvent(string sceneId, string uuid)
 1085        {
 61086            if (string.IsNullOrEmpty(uuid))
 1087            {
 01088                return;
 1089            }
 1090
 61091            onClickEvent.uuid = uuid;
 1092
 61093            SendSceneEvent(sceneId, "uuidEvent", onClickEvent);
 61094        }
 1095
 1096        // TODO: Add sceneNumber to this response
 1097        private static void ReportRaycastResult<T, P>(string sceneId, string queryId, string queryType, P payload) where
 1098        {
 01099            T response = new T();
 01100            response.queryId = queryId;
 01101            response.queryType = queryType;
 01102            response.payload = payload;
 1103
 01104            SendSceneEvent<T>(sceneId, "raycastResponse", response);
 01105        }
 1106
 01107        public static void ReportRaycastHitFirstResult(string sceneId, string queryId, RaycastType raycastType, RaycastH
 1108
 01109        public static void ReportRaycastHitAllResult(string sceneId, string queryId, RaycastType raycastType, RaycastHit
 1110
 1111        private static OnPointerEventPayload.Hit CreateHitObject(string entityId, string meshName, Vector3 point,
 1112            Vector3 normal, float distance)
 1113        {
 191114            OnPointerEventPayload.Hit hit = new OnPointerEventPayload.Hit();
 1115
 191116            hit.hitPoint = point;
 191117            hit.length = distance;
 191118            hit.normal = normal;
 191119            hit.worldNormal = normal;
 191120            hit.meshName = meshName;
 191121            hit.entityId = entityId;
 1122
 191123            return hit;
 1124        }
 1125
 1126        private static void SetPointerEventPayload(OnPointerEventPayload pointerEventPayload, ACTION_BUTTON buttonId,
 1127            string entityId, string meshName, Ray ray, Vector3 point, Vector3 normal, float distance,
 1128            bool isHitInfoValid)
 1129        {
 201130            pointerEventPayload.origin = ray.origin;
 201131            pointerEventPayload.direction = ray.direction;
 201132            pointerEventPayload.buttonId = buttonId;
 1133
 201134            if (isHitInfoValid)
 191135                pointerEventPayload.hit = CreateHitObject(entityId, meshName, point, normal, distance);
 1136            else
 11137                pointerEventPayload.hit = null;
 11138        }
 1139
 1140        public static void ReportGlobalPointerDownEvent(ACTION_BUTTON buttonId, Ray ray, Vector3 point, Vector3 normal,
 1141            float distance, string sceneId, string entityId = "0", string meshName = null, bool isHitInfoValid = false)
 1142        {
 111143            SetPointerEventPayload((OnPointerEventPayload) onGlobalPointerEventPayload, buttonId,
 1144                entityId, meshName, ray, point, normal, distance,
 1145                isHitInfoValid);
 111146            onGlobalPointerEventPayload.type = OnGlobalPointerEventPayload.InputEventType.DOWN;
 1147
 111148            onGlobalPointerEvent.payload = onGlobalPointerEventPayload;
 1149
 111150            SendSceneEvent(sceneId, "actionButtonEvent", onGlobalPointerEvent);
 111151        }
 1152
 1153        public static void ReportGlobalPointerUpEvent(ACTION_BUTTON buttonId, Ray ray, Vector3 point, Vector3 normal,
 1154            float distance, string sceneId, string entityId = "0", string meshName = null, bool isHitInfoValid = false)
 1155        {
 31156            SetPointerEventPayload((OnPointerEventPayload) onGlobalPointerEventPayload, buttonId,
 1157                entityId, meshName, ray, point, normal, distance,
 1158                isHitInfoValid);
 31159            onGlobalPointerEventPayload.type = OnGlobalPointerEventPayload.InputEventType.UP;
 1160
 31161            onGlobalPointerEvent.payload = onGlobalPointerEventPayload;
 1162
 31163            SendSceneEvent(sceneId, "actionButtonEvent", onGlobalPointerEvent);
 31164        }
 1165
 1166        public static void ReportOnPointerDownEvent(ACTION_BUTTON buttonId, string sceneId, string uuid,
 1167            string entityId, string meshName, Ray ray, Vector3 point, Vector3 normal, float distance)
 1168        {
 41169            if (string.IsNullOrEmpty(uuid))
 1170            {
 01171                return;
 1172            }
 1173
 41174            onPointerDownEvent.uuid = uuid;
 41175            SetPointerEventPayload(onPointerEventPayload, buttonId, entityId, meshName, ray, point,
 1176                normal, distance, isHitInfoValid: true);
 41177            onPointerDownEvent.payload = onPointerEventPayload;
 1178
 41179            SendSceneEvent(sceneId, "uuidEvent", onPointerDownEvent);
 41180        }
 1181
 1182        public static void ReportOnPointerUpEvent(ACTION_BUTTON buttonId, string sceneId, string uuid, string entityId,
 1183            string meshName, Ray ray, Vector3 point, Vector3 normal, float distance)
 1184        {
 21185            if (string.IsNullOrEmpty(uuid))
 1186            {
 01187                return;
 1188            }
 1189
 21190            onPointerUpEvent.uuid = uuid;
 21191            SetPointerEventPayload(onPointerEventPayload, buttonId, entityId, meshName, ray, point,
 1192                normal, distance, isHitInfoValid: true);
 21193            onPointerUpEvent.payload = onPointerEventPayload;
 1194
 21195            SendSceneEvent(sceneId, "uuidEvent", onPointerUpEvent);
 21196        }
 1197
 1198        public static void ReportOnTextSubmitEvent(string sceneId, string uuid, string text)
 1199        {
 21200            if (string.IsNullOrEmpty(uuid))
 1201            {
 01202                return;
 1203            }
 1204
 21205            onTextSubmitEvent.uuid = uuid;
 21206            onTextSubmitEvent.payload.text = text;
 1207
 21208            SendSceneEvent(sceneId, "uuidEvent", onTextSubmitEvent);
 21209        }
 1210
 1211        public static void ReportOnTextInputChangedEvent(string sceneId, string uuid, string text)
 1212        {
 171213            if (string.IsNullOrEmpty(uuid))
 1214            {
 171215                return;
 1216            }
 1217
 01218            onTextInputChangeEvent.uuid = uuid;
 01219            onTextInputChangeEvent.payload.value = text;
 1220
 01221            SendSceneEvent(sceneId, "uuidEvent", onTextInputChangeEvent);
 01222        }
 1223
 1224        public static void ReportOnTextInputChangedTextEvent(string sceneId, string uuid, string text, bool isSubmit)
 1225        {
 191226            if (string.IsNullOrEmpty(uuid))
 1227            {
 161228                return;
 1229            }
 1230
 31231            onTextInputChangeTextEvent.uuid = uuid;
 31232            onTextInputChangeTextEvent.payload.value.value = text;
 31233            onTextInputChangeTextEvent.payload.value.isSubmit = isSubmit;
 1234
 31235            SendSceneEvent(sceneId, "uuidEvent", onTextInputChangeTextEvent);
 31236        }
 1237
 1238        public static void ReportOnFocusEvent(string sceneId, string uuid)
 1239        {
 21240            if (string.IsNullOrEmpty(uuid))
 1241            {
 21242                return;
 1243            }
 1244
 01245            onFocusEvent.uuid = uuid;
 01246            SendSceneEvent(sceneId, "uuidEvent", onFocusEvent);
 01247        }
 1248
 1249        public static void ReportOnBlurEvent(string sceneId, string uuid)
 1250        {
 21251            if (string.IsNullOrEmpty(uuid))
 1252            {
 21253                return;
 1254            }
 1255
 01256            onBlurEvent.uuid = uuid;
 01257            SendSceneEvent(sceneId, "uuidEvent", onBlurEvent);
 01258        }
 1259
 1260        public static void ReportOnScrollChange(string sceneId, string uuid, Vector2 value, int pointerId)
 1261        {
 151262            if (string.IsNullOrEmpty(uuid))
 1263            {
 131264                return;
 1265            }
 1266
 21267            onScrollChangeEvent.uuid = uuid;
 21268            onScrollChangeEvent.payload.value = value;
 21269            onScrollChangeEvent.payload.pointerId = pointerId;
 1270
 21271            SendSceneEvent(sceneId, "uuidEvent", onScrollChangeEvent);
 21272        }
 1273
 01274        public static void ReportEvent<T>(string sceneId, T @event) { SendSceneEvent(sceneId, "uuidEvent", @event); }
 1275
 1276        public static void ReportOnMetricsUpdate(string sceneId, MetricsModel current,
 1277            MetricsModel limit)
 1278        {
 1861279            onMetricsUpdate.given = current;
 1861280            onMetricsUpdate.limit = limit;
 1281
 1861282            SendSceneEvent(sceneId, "metricsUpdate", onMetricsUpdate);
 1861283        }
 1284
 1285        public static void ReportOnEnterEvent(string sceneId, string uuid)
 1286        {
 01287            if (string.IsNullOrEmpty(uuid))
 01288                return;
 1289
 01290            onEnterEvent.uuid = uuid;
 1291
 01292            SendSceneEvent(sceneId, "uuidEvent", onEnterEvent);
 01293        }
 1294
 01295        public static void LogOut() { SendMessage("LogOut"); }
 1296
 01297        public static void RedirectToSignUp() { SendMessage("RedirectToSignUp"); }
 1298
 01299        public static void PreloadFinished(string sceneId) { SendMessage("PreloadFinished", sceneId); }
 1300
 1301        public static void ReportMousePosition(Vector3 mousePosition, string id)
 1302        {
 01303            positionPayload.mousePosition = mousePosition;
 01304            positionPayload.id = id;
 01305            SendMessage("ReportMousePosition", positionPayload);
 01306        }
 1307
 1308        public static void SendScreenshot(string encodedTexture, string id)
 1309        {
 01310            onSendScreenshot.encodedTexture = encodedTexture;
 01311            onSendScreenshot.id = id;
 01312            SendMessage("SendScreenshot", onSendScreenshot);
 01313        }
 1314
 1315        public static void SetDelightedSurveyEnabled(bool enabled)
 1316        {
 01317            delightedSurveyEnabled.enabled = enabled;
 01318            SendMessage("SetDelightedSurveyEnabled", delightedSurveyEnabled);
 01319        }
 1320
 1321        public static void SetScenesLoadRadius(float newRadius)
 1322        {
 11323            setScenesLoadRadiusPayload.newRadius = newRadius;
 11324            SendMessage("SetScenesLoadRadius", setScenesLoadRadiusPayload);
 11325        }
 1326
 1327        [System.Serializable]
 1328        public class SaveAvatarPayload
 1329        {
 1330            public string face256;
 1331            public string body;
 1332            public bool isSignUpFlow;
 1333            public AvatarModel avatar;
 1334        }
 1335
 1336        public static class RendererAuthenticationType
 1337        {
 01338            public static string Guest => "guest";
 01339            public static string WalletConnect => "wallet_connect";
 1340        }
 1341
 1342        [System.Serializable]
 1343        public class SendAuthenticationPayload
 1344        {
 1345            public string rendererAuthenticationType;
 1346        }
 1347
 1348        [System.Serializable]
 1349        public class SendPassportPayload
 1350        {
 1351            public string name;
 1352            public string email;
 1353        }
 1354
 1355        [System.Serializable]
 1356        public class SendSaveUserUnverifiedNamePayload
 1357        {
 1358            public string newUnverifiedName;
 1359        }
 1360
 1361        [System.Serializable]
 1362        public class SendSaveUserDescriptionPayload
 1363        {
 1364            public string description;
 1365
 01366            public SendSaveUserDescriptionPayload(string description) { this.description = description; }
 1367        }
 1368
 1369        [Serializable]
 1370        public class SendVideoProgressEvent
 1371        {
 1372            public string componentId;
 1373            public string sceneId;
 1374            public string videoTextureId;
 1375            public int status;
 1376            public float currentOffset;
 1377            public float videoLength;
 1378        }
 1379
 21380        public static void RequestOwnProfileUpdate() { SendMessage("RequestOwnProfileUpdate"); }
 1381
 1382        public static void SendSaveAvatar(AvatarModel avatar, Texture2D face256Snapshot, Texture2D bodySnapshot, bool is
 1383        {
 11384            var payload = new SaveAvatarPayload()
 1385            {
 1386                avatar = avatar,
 1387                face256 = System.Convert.ToBase64String(face256Snapshot.EncodeToPNG()),
 1388                body = System.Convert.ToBase64String(bodySnapshot.EncodeToPNG()),
 1389                isSignUpFlow = isSignUpFlow
 1390            };
 11391            SendMessage("SaveUserAvatar", payload);
 11392        }
 1393
 01394        public static void SendAuthentication(string rendererAuthenticationType) { SendMessage("SendAuthentication", new
 1395
 21396        public static void SendPassport(string name, string email) { SendMessage("SendPassport", new SendPassportPayload
 1397
 1398        public static void SendSaveUserUnverifiedName(string newName)
 1399        {
 01400            var payload = new SendSaveUserUnverifiedNamePayload()
 1401            {
 1402                newUnverifiedName = newName
 1403            };
 1404
 01405            SendMessage("SaveUserUnverifiedName", payload);
 01406        }
 1407
 01408        public static void SendSaveUserDescription(string about) { SendMessage("SaveUserDescription", new SendSaveUserDe
 1409
 21410        public static void SendUserAcceptedCollectibles(string airdropId) { SendMessage("UserAcceptedCollectibles", new 
 1411
 01412        public static void SaveUserTutorialStep(int newTutorialStep) { SendMessage("SaveUserTutorialStep", new TutorialS
 1413
 01414        public static void SendPerformanceReport(string performanceReportPayload) { SendJson("PerformanceReport", perfor
 1415
 01416        public static void SendSystemInfoReport() { SendMessage("SystemInfoReport", new SystemInfoReportPayload()); }
 1417
 1418        public static void SendTermsOfServiceResponse(string sceneId, bool accepted, bool dontShowAgain)
 1419        {
 21420            var payload = new TermsOfServiceResponsePayload()
 1421            {
 1422                sceneId = sceneId,
 1423                accepted = accepted,
 1424                dontShowAgain = dontShowAgain
 1425            };
 21426            SendMessage("TermsOfServiceResponse", payload);
 21427        }
 1428
 1429        public static void SendExpression(string expressionID, long timestamp)
 1430        {
 11431            SendMessage("TriggerExpression", new SendExpressionPayload()
 1432            {
 1433                id = expressionID,
 1434                timestamp = timestamp
 1435            });
 11436        }
 1437
 1438        public static void OpenURL(string url)
 1439        {
 1440#if UNITY_WEBGL
 31441            SendMessage("OpenWebURL", new OpenURLPayload { url = url });
 1442#else
 1443            Application.OpenURL(url);
 1444#endif
 31445        }
 1446
 21447        public static void PublishStatefulScene(ProtocolV2.PublishPayload payload) { MessageFromEngine("PublishSceneStat
 1448
 121449        public static void StartIsolatedMode(IsolatedConfig config) { MessageFromEngine("StartIsolatedMode", JsonConvert
 1450
 61451        public static void StopIsolatedMode(IsolatedConfig config) { MessageFromEngine("StopIsolatedMode", JsonConvert.S
 1452
 1453        public static void SendReportScene(string sceneID)
 1454        {
 11455            SendMessage("ReportScene", new SendReportScenePayload
 1456            {
 1457                sceneId = sceneID
 1458            });
 11459        }
 1460
 1461        public static void SetHomeScene(string sceneID)
 1462        {
 01463            SendMessage("SetHomeScene", new SetHomeScenePayload
 1464            {
 1465                sceneId = sceneID
 1466            });
 01467        }
 1468
 1469        public static void SendReportPlayer(string playerId, string playerName)
 1470        {
 11471            SendMessage("ReportPlayer", new SendReportPlayerPayload
 1472            {
 1473                userId = playerId,
 1474                name = playerName
 1475            });
 11476        }
 1477
 1478        public static void SendBlockPlayer(string userId)
 1479        {
 11480            SendMessage("BlockPlayer", new SendBlockPlayerPayload()
 1481            {
 1482                userId = userId
 1483            });
 11484        }
 1485
 1486        public static void SendUnblockPlayer(string userId)
 1487        {
 01488            SendMessage("UnblockPlayer", new SendUnblockPlayerPayload()
 1489            {
 1490                userId = userId
 1491            });
 01492        }
 1493
 1494        public static void RequestScenesInfoAroundParcel(Vector2 parcel, int maxScenesArea)
 1495        {
 51496            SendMessage("RequestScenesInfoInArea", new RequestScenesInfoAroundParcelPayload()
 1497            {
 1498                parcel = parcel,
 1499                scenesAround = maxScenesArea
 1500            });
 51501        }
 1502
 1503        public static void SendAudioStreamEvent(string url, bool play, float volume)
 1504        {
 201505            onAudioStreamingEvent.url = url;
 201506            onAudioStreamingEvent.play = play;
 201507            onAudioStreamingEvent.volume = volume;
 201508            SendMessage("SetAudioStream", onAudioStreamingEvent);
 201509        }
 1510
 21511        public static void JoinVoiceChat() { SendMessage("JoinVoiceChat"); }
 1512
 21513        public static void LeaveVoiceChat() { SendMessage("LeaveVoiceChat"); }
 1514
 1515        public static void SendSetVoiceChatRecording(bool recording)
 1516        {
 01517            setVoiceChatRecordingPayload.recording = recording;
 01518            SendMessage("SetVoiceChatRecording", setVoiceChatRecordingPayload);
 01519        }
 1520
 01521        public static void ToggleVoiceChatRecording() { SendMessage("ToggleVoiceChatRecording"); }
 1522
 1523        public static void ApplySettings(float voiceChatVolume, int voiceChatAllowCategory)
 1524        {
 61525            applySettingsPayload.voiceChatVolume = voiceChatVolume;
 61526            applySettingsPayload.voiceChatAllowCategory = voiceChatAllowCategory;
 61527            SendMessage("ApplySettings", applySettingsPayload);
 61528        }
 1529
 1530        public static void RequestGIFProcessor(string gifURL, string gifId, bool isWebGL1)
 1531        {
 01532            gifSetupPayload.imageSource = gifURL;
 01533            gifSetupPayload.id = gifId;
 01534            gifSetupPayload.isWebGL1 = isWebGL1;
 1535
 01536            SendMessage("RequestGIFProcessor", gifSetupPayload);
 01537        }
 1538
 1539        public static void DeleteGIF(string id)
 1540        {
 01541            stringPayload.value = id;
 01542            SendMessage("DeleteGIF", stringPayload);
 01543        }
 1544
 1545        public static void GoTo(int x, int y)
 1546        {
 01547            gotoEvent.x = x;
 01548            gotoEvent.y = y;
 01549            SendMessage("GoTo", gotoEvent);
 01550        }
 1551
 1552        public static void GoToCrowd()
 1553        {
 01554            SendMessage("GoToCrowd");
 01555        }
 1556
 1557        public static void GoToMagic()
 1558        {
 01559            SendMessage("GoToMagic");
 01560        }
 1561
 1562        public static void LoadingHUDReadyForTeleport(int x, int y)
 1563        {
 01564            gotoEvent.x = x;
 01565            gotoEvent.y = y;
 01566            SendMessage("LoadingHUDReadyForTeleport", gotoEvent);
 01567        }
 1568
 1569        public static void JumpIn(int x, int y, string serverName, string layerName)
 1570        {
 01571            jumpInPayload.realm.serverName = serverName;
 01572            jumpInPayload.realm.layer = layerName;
 1573
 01574            jumpInPayload.gridPosition.x = x;
 01575            jumpInPayload.gridPosition.y = y;
 1576
 01577            SendMessage("JumpIn", jumpInPayload);
 01578        }
 1579
 1580        public static void SendChatMessage(ChatMessage message)
 1581        {
 01582            sendChatMessageEvent.message = message;
 01583            SendMessage("SendChatMessage", sendChatMessageEvent);
 01584        }
 1585
 01586        public static void UpdateFriendshipStatus(FriendshipUpdateStatusMessage message) { SendMessage("UpdateFriendship
 1587
 01588        public static void ScenesLoadingFeedback(LoadingFeedbackMessage message) { SendMessage("ScenesLoadingFeedback", 
 1589
 01590        public static void FetchHotScenes() { SendMessage("FetchHotScenes"); }
 1591
 1592        public static void SetBaseResolution(int resolution)
 1593        {
 21594            baseResEvent.baseResolution = resolution;
 21595            SendMessage("SetBaseResolution", baseResEvent);
 21596        }
 1597
 01598        public static void ReportAnalyticsEvent(string eventName) { ReportAnalyticsEvent(eventName, null); }
 1599
 1600        public static void ReportAnalyticsEvent(string eventName, AnalyticsPayload.Property[] eventProperties)
 1601        {
 01602            analyticsEvent.name = eventName;
 01603            analyticsEvent.properties = eventProperties;
 01604            SendMessage("Track", analyticsEvent);
 01605        }
 1606
 41607        public static void FetchBalanceOfMANA() { SendMessage("FetchBalanceOfMANA"); }
 1608
 1609        public static void SendSceneExternalActionEvent(string sceneId, string type, string payload)
 1610        {
 01611            sceneExternalActionEvent.type = type;
 01612            sceneExternalActionEvent.payload = payload;
 01613            SendSceneEvent(sceneId, "externalAction", sceneExternalActionEvent);
 01614        }
 1615
 1616        public static void SetMuteUsers(string[] usersId, bool mute)
 1617        {
 41618            muteUserEvent.usersId = usersId;
 41619            muteUserEvent.mute = mute;
 41620            SendMessage("SetMuteUsers", muteUserEvent);
 41621        }
 1622
 1623        public static void SendCloseUserAvatar(bool isSignUpFlow)
 1624        {
 01625            closeUserAvatarPayload.isSignUpFlow = isSignUpFlow;
 01626            SendMessage("CloseUserAvatar", closeUserAvatarPayload);
 01627        }
 1628
 1629        // Warning: Use this method only for PEXs non-associated to smart wearables.
 1630        //          For PEX associated to smart wearables use 'SetDisabledPortableExperiences'.
 1631        public static void KillPortableExperience(string portableExperienceId)
 1632        {
 01633            killPortableExperiencePayload.portableExperienceId = portableExperienceId;
 01634            SendMessage("KillPortableExperience", killPortableExperiencePayload);
 01635        }
 1636
 1637        public static void RequestThirdPartyWearables(
 1638            string ownedByUser,
 1639            string thirdPartyCollectionId,
 1640            string context)
 1641        {
 11642            requestWearablesPayload.filters = new WearablesRequestFiltersPayload
 1643            {
 1644                ownedByUser = ownedByUser,
 1645                thirdPartyId = thirdPartyCollectionId,
 1646                collectionIds = null,
 1647                wearableIds = null
 1648            };
 1649
 11650            requestWearablesPayload.context = context;
 1651
 11652            SendMessage("RequestWearables", requestWearablesPayload);
 11653        }
 1654
 1655        public static void SetDisabledPortableExperiences(string[] idsToDisable)
 1656        {
 81657            setDisabledPortableExperiencesPayload.idsToDisable = idsToDisable;
 81658            SendMessage("SetDisabledPortableExperiences", setDisabledPortableExperiencesPayload);
 81659        }
 1660
 1661        public static void RequestWearables(
 1662            string ownedByUser,
 1663            string[] wearableIds,
 1664            string[] collectionIds,
 1665            string context)
 1666        {
 01667            requestWearablesPayload.filters = new WearablesRequestFiltersPayload
 1668            {
 1669                ownedByUser = ownedByUser,
 1670                wearableIds = wearableIds,
 1671                collectionIds = collectionIds,
 1672                thirdPartyId = null
 1673            };
 1674
 01675            requestWearablesPayload.context = context;
 1676
 01677            SendMessage("RequestWearables", requestWearablesPayload);
 01678        }
 1679
 1680        public static void RequestEmotes(
 1681            string ownedByUser,
 1682            string[] emoteIds,
 1683            string[] collectionIds,
 1684            string context)
 1685        {
 01686            requestEmotesPayload.filters = new EmotesRequestFiltersPayload()
 1687            {
 1688                ownedByUser = ownedByUser,
 1689                emoteIds = emoteIds,
 1690                collectionIds = collectionIds,
 1691                thirdPartyId = null
 1692            };
 1693
 01694            requestEmotesPayload.context = context;
 1695
 01696            SendMessage("RequestEmotes", requestEmotesPayload);
 01697        }
 1698
 1699        public static void SearchENSOwner(string name, int maxResults)
 1700        {
 61701            searchEnsOwnerPayload.name = name;
 61702            searchEnsOwnerPayload.maxResults = maxResults;
 1703
 61704            SendMessage("SearchENSOwner", searchEnsOwnerPayload);
 61705        }
 1706
 01707        public static void RequestHomeCoordinates() { SendMessage("RequestHomeCoordinates"); }
 1708
 1709        public static void RequestUserProfile(string userId)
 1710        {
 161711            stringPayload.value = userId;
 161712            SendMessage("RequestUserProfile", stringPayload);
 161713        }
 1714
 01715        public static void ReportAvatarFatalError(string payload) { SendJson("ReportAvatarFatalError", payload); }
 1716
 1717        public static void UnpublishScene(Vector2Int sceneCoordinates)
 1718        {
 01719            var payload = new UnpublishScenePayload() { coordinates = $"{sceneCoordinates.x},{sceneCoordinates.y}" };
 01720            SendMessage("UnpublishScene", payload);
 01721        }
 1722
 1723        public static void NotifyStatusThroughChat(string message)
 1724        {
 01725            stringPayload.value = message;
 01726            SendMessage("NotifyStatusThroughChat", stringPayload);
 01727        }
 1728
 1729        public static void ReportVideoProgressEvent(
 1730            string componentId,
 1731            string sceneId,
 1732            string videoClipId,
 1733            int videoStatus,
 1734            float currentOffset,
 1735            float length)
 1736        {
 451737            SendVideoProgressEvent progressEvent = new SendVideoProgressEvent()
 1738            {
 1739                componentId = componentId,
 1740                sceneId = sceneId,
 1741                videoTextureId = videoClipId,
 1742                status = videoStatus,
 1743                currentOffset = currentOffset,
 1744                videoLength = length
 1745            };
 1746
 451747            SendMessage("VideoProgressEvent", progressEvent);
 451748        }
 1749
 1750        public static void ReportAvatarRemoved(string avatarId)
 1751        {
 01752            avatarStatePayload.type = "Removed";
 01753            avatarStatePayload.avatarShapeId = avatarId;
 01754            SendMessage("ReportAvatarState", avatarStatePayload);
 01755        }
 1756
 1757        public static void ReportAvatarSceneChanged(string avatarId, string sceneId)
 1758        {
 01759            avatarSceneChangedPayload.type = "SceneChanged";
 01760            avatarSceneChangedPayload.avatarShapeId = avatarId;
 01761            avatarSceneChangedPayload.sceneId = sceneId;
 01762            SendMessage("ReportAvatarState", avatarSceneChangedPayload);
 01763        }
 1764
 1765        public static void ReportAvatarClick(string sceneId, string userId, Vector3 rayOrigin, Vector3 rayDirection, flo
 1766        {
 01767            avatarOnClickPayload.userId = userId;
 01768            avatarOnClickPayload.ray.origin = rayOrigin;
 01769            avatarOnClickPayload.ray.direction = rayDirection;
 01770            avatarOnClickPayload.ray.distance = distance;
 1771
 01772            SendSceneEvent(sceneId, "playerClicked", avatarOnClickPayload);
 01773        }
 1774
 1775        public static void ReportOnPointerHoverEnterEvent(string sceneId, string uuid)
 1776        {
 41777            onPointerHoverEnterEvent.uuid = uuid;
 41778            SendSceneEvent(sceneId, "uuidEvent", onPointerHoverEnterEvent);
 41779        }
 1780
 1781        public static void ReportOnPointerHoverExitEvent(string sceneId, string uuid)
 1782        {
 11783            onPointerHoverExitEvent.uuid = uuid;
 11784            SendSceneEvent(sceneId, "uuidEvent", onPointerHoverExitEvent);
 11785        }
 1786
 1787        public static void ReportTime(float time, bool isPaused, float timeNormalizationFactor, float cycleTime)
 1788        {
 61789            timeReportPayload.time = time;
 61790            timeReportPayload.isPaused = isPaused;
 61791            timeReportPayload.timeNormalizationFactor = timeNormalizationFactor;
 61792            timeReportPayload.cycleTime = cycleTime;
 61793            SendMessage("ReportDecentralandTime", timeReportPayload);
 61794        }
 1795
 1796        public static void GetFriendsWithDirectMessages(string userNameOrId, int limit, int skip)
 1797        {
 01798            getFriendsWithDirectMessagesPayload.userNameOrId = userNameOrId;
 01799            getFriendsWithDirectMessagesPayload.limit = limit;
 01800            getFriendsWithDirectMessagesPayload.skip = skip;
 01801            SendMessage("GetFriendsWithDirectMessages", getFriendsWithDirectMessagesPayload);
 01802        }
 1803
 1804        public static void MarkMessagesAsSeen(string userId)
 1805        {
 11806            markMessagesAsSeenPayload.userId = userId;
 11807            SendMessage("MarkMessagesAsSeen", markMessagesAsSeenPayload);
 11808        }
 1809
 1810        public static void GetPrivateMessages(string userId, int limit, string fromMessageId)
 1811        {
 01812            getPrivateMessagesPayload.userId = userId;
 01813            getPrivateMessagesPayload.limit = limit;
 01814            getPrivateMessagesPayload.fromMessageId = fromMessageId;
 01815            SendMessage("GetPrivateMessages", getPrivateMessagesPayload);
 01816        }
 1817
 1818        public static void MarkChannelMessagesAsSeen(string channelId)
 1819        {
 21820            markChannelMessagesAsSeenPayload.channelId = channelId;
 21821            SendMessage("MarkChannelMessagesAsSeen", markChannelMessagesAsSeenPayload);
 21822        }
 1823
 01824        public static void GetUnseenMessagesByUser() { SendMessage("GetUnseenMessagesByUser"); }
 1825
 1826        public static void GetUnseenMessagesByChannel()
 1827        {
 01828            SendMessage("GetUnseenMessagesByChannel");
 01829        }
 1830
 1831        public static void GetFriends(int limit, int skip)
 1832        {
 01833            SendMessage("GetFriends", new GetFriendsPayload
 1834            {
 1835                limit = limit,
 1836                skip = skip
 1837            });
 01838        }
 1839
 1840        public static void GetFriends(string usernameOrId, int limit)
 1841        {
 01842            SendMessage("GetFriends", new GetFriendsPayload
 1843            {
 1844                userNameOrId = usernameOrId,
 1845                limit = limit
 1846            });
 01847        }
 1848
 1849        public static void GetFriendRequests(int sentLimit, int sentSkip, int receivedLimit, int receivedSkip)
 1850        {
 01851            SendMessage("GetFriendRequests", new GetFriendRequestsPayload
 1852            {
 1853                receivedSkip = receivedSkip,
 1854                receivedLimit = receivedLimit,
 1855                sentSkip = sentSkip,
 1856                sentLimit = sentLimit
 1857            });
 01858        }
 1859
 1860        public static void LeaveChannel(string channelId)
 1861        {
 01862            SendMessage("LeaveChannel", new LeaveChannelPayload
 1863            {
 1864                channelId = channelId
 1865            });
 01866        }
 1867
 1868        public static void CreateChannel(string channelId)
 1869        {
 01870            SendMessage("CreateChannel", new CreateChannelPayload
 1871            {
 1872                channelId = channelId
 1873            });
 01874        }
 1875
 1876        public static void JoinOrCreateChannel(string channelId)
 1877        {
 01878            SendMessage("JoinOrCreateChannel", new JoinOrCreateChannelPayload
 1879            {
 1880                channelId = channelId
 1881            });
 01882        }
 1883
 1884        public static void GetChannelMessages(string channelId, int limit, string fromMessageId)
 1885        {
 01886            SendMessage("GetChannelMessages", new GetChannelMessagesPayload
 1887            {
 1888                channelId = channelId,
 1889                limit = limit,
 1890                from = fromMessageId
 1891            });
 01892        }
 1893
 1894        public static void GetJoinedChannels(int limit, int skip)
 1895        {
 01896            SendMessage("GetJoinedChannels", new GetJoinedChannelsPayload
 1897            {
 1898                limit = limit,
 1899                skip = skip
 1900            });
 01901        }
 1902
 1903        public static void GetChannels(int limit, string since, string name)
 1904        {
 11905            SendMessage("GetChannels", new GetChannelsPayload
 1906            {
 1907                limit = limit,
 1908                since = since,
 1909                name = name
 1910            });
 11911        }
 1912
 1913        public static void GetChannelInfo(string[] channelIds)
 1914        {
 01915            SendMessage("GetChannelInfo", new GetChannelInfoPayload
 1916            {
 1917                channelIds = channelIds
 1918            });
 01919        }
 1920
 1921        public static void GetChannelMembers(string channelId, int limit, int skip, string name)
 1922        {
 01923            SendMessage("GetChannelMembers", new GetChannelMembersPayload
 1924            {
 1925                channelId = channelId,
 1926                limit = limit,
 1927                skip = skip,
 1928                userName = name
 1929            });
 01930        }
 1931
 1932        public static void MuteChannel(string channelId, bool muted)
 1933        {
 01934            SendMessage("MuteChannel", new MuteChannelPayload
 1935            {
 1936                channelId = channelId,
 1937                muted = muted
 1938            });
 01939        }
 1940
 1941        public static void UpdateMemoryUsage()
 1942        {
 01943            SendMessage("UpdateMemoryUsage");
 01944        }
 1945
 01946        public static void RequestAudioDevices() => SendMessage("RequestAudioDevices");
 1947
 1948        public static void SetInputAudioDevice(string inputDeviceId)
 1949        {
 01950            SendMessage(nameof(SetInputAudioDevice), new SetInputAudioDevicePayload()
 1951            {
 1952                deviceId = inputDeviceId
 1953            });
 01954        }
 1955    }
 1956}

Methods/Properties

WebInterface()
SceneReady(System.String)
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.String, 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.String)
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.String, System.String)
ReportRaycastResult[T, P](System.String, System.String, System.String, P)
ReportRaycastHitFirstResult(System.String, System.String, DCL.Models.RaycastType, DCL.Interface.WebInterface/RaycastHitEntity)
ReportRaycastHitAllResult(System.String, 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.String, System.String, System.String, System.Boolean)
ReportGlobalPointerUpEvent(DCL.Interface.WebInterface/ACTION_BUTTON, UnityEngine.Ray, UnityEngine.Vector3, UnityEngine.Vector3, System.Single, System.String, System.String, System.String, System.Boolean)
ReportOnPointerDownEvent(DCL.Interface.WebInterface/ACTION_BUTTON, System.String, System.String, System.String, System.String, UnityEngine.Ray, UnityEngine.Vector3, UnityEngine.Vector3, System.Single)
ReportOnPointerUpEvent(DCL.Interface.WebInterface/ACTION_BUTTON, System.String, System.String, System.String, System.String, UnityEngine.Ray, UnityEngine.Vector3, UnityEngine.Vector3, System.Single)
ReportOnTextSubmitEvent(System.String, System.String, System.String)
ReportOnTextInputChangedEvent(System.String, System.String, System.String)
ReportOnTextInputChangedTextEvent(System.String, System.String, System.String, System.Boolean)
ReportOnFocusEvent(System.String, System.String)
ReportOnBlurEvent(System.String, System.String)
ReportOnScrollChange(System.String, System.String, UnityEngine.Vector2, System.Int32)
ReportEvent[T](System.String, T)
ReportOnMetricsUpdate(System.String, DCL.Interface.WebInterface/MetricsModel, DCL.Interface.WebInterface/MetricsModel)
ReportOnEnterEvent(System.String, System.String)
LogOut()
RedirectToSignUp()
PreloadFinished(System.String)
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)
SendUserAcceptedCollectibles(System.String)
SaveUserTutorialStep(System.Int32)
SendPerformanceReport(System.String)
SendSystemInfoReport()
SendTermsOfServiceResponse(System.String, System.Boolean, System.Boolean)
SendExpression(System.String, System.Int64)
OpenURL(System.String)
PublishStatefulScene(ProtocolV2/PublishPayload)
StartIsolatedMode(IsolatedConfig)
StopIsolatedMode(IsolatedConfig)
SendReportScene(System.String)
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)
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.String, 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.String, System.String, System.Int32, System.Single, System.Single)
ReportAvatarRemoved(System.String)
ReportAvatarSceneChanged(System.String, System.String)
ReportAvatarClick(System.String, System.String, UnityEngine.Vector3, UnityEngine.Vector3, System.Single)
ReportOnPointerHoverEnterEvent(System.String, System.String)
ReportOnPointerHoverExitEvent(System.String, 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)
GetFriendRequests(System.Int32, System.Int32, System.Int32, 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)