Click or drag to resize

ExampleCustomMessage Class

This example shows how to implement custom messages. Any user can press a key to send a custom message to all connected users, including themselves. When the message is received, it is used to toggle the visibility of an object in the scene. For a guide that covers the whole process of setting up custom message types and using them in your scenes, please see this page on the wiki - https://immerselearning.atlassian.net/wiki/spaces/SDK/pages/139395094/Custom+Scene+Messages
Inheritance Hierarchy
SystemObject
  UnityEngine.Object
    UnityEngine.Component
      UnityEngine.Behaviour
        UnityEngine.MonoBehaviour
          ImmerseSDK.ExamplesExampleBase
            ImmerseSDK.ExamplesExampleCustomMessage

Namespace:  ImmerseSDK.Examples
Assembly:  ImmerseSDK.NotInDll (in ImmerseSDK.NotInDll.dll) Version: 3.5.0.0 (3.5.0.0)
Syntax
C#
public class ExampleCustomMessage : ExampleBase

The ExampleCustomMessage type exposes the following members.

Constructors
  NameDescription
Public methodExampleCustomMessage
Initializes a new instance of the ExampleCustomMessage class
Top
Methods
  NameDescription
Protected methodStart
Make the Unity Start method a coroutine, so it can yield while the ImmerseSDK is initialising
(Overrides ExampleBaseStart.)
Top
Fields
  NameDescription
Public field_targetObject
An object that gets shown / hidden in the scene
Top
Extension Methods
  NameDescription
Public Extension MethodGetCopyOf
Copies all properties of a component from source to target. Uses reflection to set properties.
(Defined by ComponentExtensions.)
Public Extension MethodWaitForT
Waits for a singleton on a coroutine
(Defined by SingletonManager.)
Top
See Also