Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The core header files in the Source/Public folder define the core structure and functionality of the Cavrnus Spatial Connector plugin for Unreal Engine.

General Notes:

  • The plugin heavily relies on delegates (callbacks) for asynchronous operations and event handling.

  • The CavrnusFunctionLibrary is the primary interface for Blueprint users to interact with the plugin.

  • The plugin seems to have a robust system for managing properties, including different data types and the ability to define default values and bind to property updates.

  • The plugin includes features for user management, voice and video communication, and remote content handling, indicating its focus on collaborative experiences.

General Workflow:

The following workflow describes how to integrate the Cavrnus Spatial Connector into your project. This workflow is provided purely for development understanding, as most of this work is done automatically for you simply by dropping in the CavrnusSpatialConnector actor into a Level within the Unreal Editor interface.

1. Configuration:

  • Set up the plugin settings using UCavrnusConnectorSettings, specifying parameters like auto-start behavior, RelayNet configuration, and logging options.

2. Authentication:

  • Use UCavrnusFunctionLibrary to authenticate users, either with email/password (AuthenticateWithPassword) or as a guest (AuthenticateAsGuest).

  • Handle login UI interactions using UCavrnusLoginWidget and UCavrnusGuestLoginWidget.

3. Space Selection and Joining:

  • Fetch and display available spaces using UCavrnusFunctionLibrary::FetchJoinableSpaces and UCavrnusSpaceListWidget.

  • Implement pagination for the space list using UPagination and IListElementInterface.

  • Allow users to select a space and join it using UCavrnusFunctionLibrary::JoinSpace.

4. Property Synchronization:

  • Attach UCavrnusValueSyncBase-derived components (e.g., UCavrnusValueSyncFloat, UCavrnusValueSyncTransform) to actors to synchronize their properties.

  • Configure the components with the property names and update settings.

5. Real-Time Updates:

  • Use UCavrnusLivePropertyUpdate-derived classes to send and receive real-time property updates between Unreal Engine and Cavrnus.

6. User Interface:

  • Create custom UI elements by extending UCavrnusBaseUserWidget.

  • Display user information and video streams using UCavrnusUserWidget.

  • Utilize UTexture2dDynamicHelper for handling dynamic textures in the UI.

7. Additional Features:

  • Explore other functionalities provided by UCavrnusFunctionLibrary, such as chat messaging, object spawning, permissions management, and voice/video communication.

Headers

CavrnusConnectorSettings.h:

  • Purpose: This file defines the UCavrnusConnectorSettings class, which stores the configuration settings for the plugin.

  • Functions:

    • PostInitProperties: Initialization function for the Connector.

    • GetRelayNetOptionalParameters: Generates a string representing the verbose parameter list for CavrnusRelayNet.

    • PostEditChangeProperty: Called when an edit is made to the settings (Available only in the editor)

  • Key Elements:

    • AutoStartConnector: Determines whether the connector should automatically start.

    • RelayNetPort, RelayNetIPAddress, RelayNetExecutableRelativeLocation: Settings for the RelayNet executable, the foundation for Cavrnus real-time collaboration.

    • RelayNetSilent, RelayNetVerboseLogging, RelayNetLogOutputToFile: Options for controlling the behavior and logging of RelayNet.

CavrnusFileUtilityLibrary.h:

  • Purpose: This file declares the UCavrnusFileUtilityLibrary class, a Blueprint function library that provides utility functions for file operations.

  • Key Elements:

    • OpenFileDialog: Opens a file dialog for selecting files.

    • OpenFolderDialog: Opens a folder dialog for selecting folders.

CavrnusFunctionLibrary.h:

  • Purpose: This is the main Blueprint function library for interacting with the Cavrnus Spatial Connector. It provides a wide range of static utility functions for authentication, space management, property manipulation, permissions, user interactions, and more.

  • Key Elements:

    • Authentication functions: (AuthenticateWithPassword, AuthenticateAsGuest, etc.).

    • Space management functions: (FetchJoinableSpaces, JoinSpace, ExitSpace, etc.).

    • Property functions: (Bool, Float, String, Vector, Transform, Color).

    • Permission functions: (BindGlobalPolicy, BindSpacePolicy).

    • Spawned Object functions: (SpawnObject, DestroyObject).

    • Space User functions: (AwaitLocalUser, GetCurrentSpaceUsers, BindSpaceUsers, etc.).

    • Voice and Video functions: (SetLocalUserMutedState, FetchSavedAudioInput, UpdateAudioInput, etc.).

    • Remote Content functions: (FetchFileById, FetchAllUploadedContent, UploadContent, etc.).

    • Chat functions: (FetchFileById, FetchAllUploadedContent, UploadContent, etc.).

    • Functions for handling permissions, spawned objects, space users, voice and video, and remote content.

CavrnusPropertiesContainer.h:

  • Purpose: This file defines the UCavrnusPropertiesContainer component, which is attached to actors to manage property containers within the Cavrnus system. Containers are a way to uniquely identify synchronized values in the Journal of a Cavrnus Space.

  • Functions:

    • InitializeComponent: Called when the component is initialized, allowing for custom initialization logic..

  • Key Elements:

    • ContainerName: This property stores the name of the container, which can be used to identify it within the Cavrnus system.

CavrnusSpatialConnector.h

  • Purpose: This file defines the ACavrnusSpatialConnector actor, which is the main entry point for the plugin's functionality.

  • Functions:

    • InitializeComponent: Called when the component is initialized, allowing for custom initialization logic..

  • Key Elements:

    • MyServer: The address of the Cavrnus server.

    • Various configuration options for authentication, space joining, avatar management, and UI elements.

CavrnusSpatialConnectorSubSystem.h

  • Purpose: This file defines the UCavrnusSpatialConnectorSubSystem and UCavrnusSpatialConnectorSubSystemProxy classes, which manage the lifecycle and interactions with the Cavrnus Spatial Connector.

  • Key Elements:

    • UIManager: A class for managing UI widgets within the Cavrnus system.

    • Functions for authentication, space joining, and handling callbacks.

 

Table of Contents
stylenone