Core API Reference¶
Complete API reference for the Core module.
IntelliVerseXSDK¶
Main SDK entry point and orchestrator.
Properties¶
| Property | Type | Description |
|---|---|---|
Instance | IntelliVerseXSDK | Singleton instance |
IsInitialized | bool | SDK initialization status |
Config | IntelliVerseXConfig | Configuration asset |
Version | string | SDK version string |
Methods¶
InitializeAsync¶
Initializes the SDK and all enabled modules.
Returns: Task - Completes when initialization is done
Example:
GetModule¶
Gets a module instance by type.
Type Parameters: - T - Module type implementing IIVXModule
Returns: Module instance or null if not enabled
Example:
IsFeatureEnabled¶
Checks if a feature is enabled.
Parameters: - featureName - Feature identifier
Returns: true if enabled
Events¶
| Event | Type | Description |
|---|---|---|
OnInitialized | Action | Fired when SDK initializes |
OnInitializationFailed | Action<Exception> | Fired on init failure |
IVXLogger¶
Centralized logging system.
Methods¶
Log¶
Logs a message at the specified level.
Parameters: - message - Log message - level - Log level (Debug, Info, Warning, Error)
Example:
IVXLogger.Log("Player logged in", LogLevel.Info);
IVXLogger.Log("Connection retry", LogLevel.Debug);
SetLogLevel¶
Sets minimum log level for output.
Parameters: - level - Minimum level to display
Log Levels¶
| Level | Value | Description |
|---|---|---|
Debug | 0 | Verbose debugging |
Info | 1 | General information |
Warning | 2 | Potential issues |
Error | 3 | Errors |
None | 4 | Disable logging |
IVXSafeSingleton¶
Thread-safe singleton base class.
Usage¶
public class MyManager : IVXSafeSingleton<MyManager>
{
protected override void Initialize()
{
// One-time initialization
}
}
// Access
MyManager.Instance.DoSomething();
Properties¶
| Property | Type | Description |
|---|---|---|
Instance | T | Singleton instance |
IsInitialized | bool | Initialization status |
IntelliVerseXConfig¶
ScriptableObject holding SDK configuration.
Properties¶
| Property | Type | Description |
|---|---|---|
GameName | string | Game display name |
GameId | string | Unique game identifier |
LogLevel | LogLevel | Logging verbosity |
DebugMode | bool | Enable debug features |
Module Flags¶
| Property | Type | Default |
|---|---|---|
EnableBackend | bool | true |
EnableIdentity | bool | true |
EnableAnalytics | bool | true |
EnableAds | bool | true |
EnableIAP | bool | true |
EnableQuiz | bool | false |
EnableFriends | bool | false |
IIVXModule¶
Interface for SDK modules.
Methods¶
public interface IIVXModule
{
Task InitializeAsync();
void Shutdown();
bool IsInitialized { get; }
}
IVXCoroutineRunner¶
MonoBehaviour for running coroutines from non-MonoBehaviour classes.
Methods¶
Run¶
Starts a coroutine.
Example:
RunDelayed¶
Runs an action after a delay.
Example:
Utility Classes¶
IVXExtensions¶
Extension methods for common operations.
// String extensions
"hello".IsNullOrEmpty() // false
"".IsNullOrEmpty() // true
// Collection extensions
list.IsNullOrEmpty() // Check if null or empty
list.ToJson() // Serialize to JSON
IVXJsonUtility¶
JSON serialization helpers.
// Serialize
string json = IVXJsonUtility.ToJson(myObject);
// Deserialize
MyClass obj = IVXJsonUtility.FromJson<MyClass>(json);
// Pretty print
string pretty = IVXJsonUtility.ToJsonPretty(myObject);