Class CompanionResourceSync
Tracks associations between MARS Companion cloud resources and assets in a Unity project
Namespace: Unity.MARS.Companion.Core
Syntax
public class CompanionResourceSync : EditorScriptableSettings<CompanionResourceSync>, ISerializationCallbackReceiver
Methods
GetAssetGuid(String)
Get an asset guid for a given cloud guid, or null if the cloud guid is not tracked
Declaration
public string GetAssetGuid(string cloudGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| String | cloudGuid | The cloud guid |
Returns
| Type | Description |
|---|---|
| String | The asset guid for the asset associated with the given cloud guid, or null if one was not found |
GetCloudGuid(String)
Get a new or existing cloud guid for a given asset guid
Declaration
public string GetCloudGuid(string assetGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| String | assetGuid | The asset guid |
Returns
| Type | Description |
|---|---|
| String | The cloud guid for the resource associated with the given asset guid, or a new guid if one was not found |
OnLoaded()
Called when this ScriptableObject is loaded
Declaration
protected override void OnLoaded()
RemoveCloudGuid(String)
Remove a tracked resource, using its cloud guid as the key
Declaration
public void RemoveCloudGuid(string cloudGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| String | cloudGuid | The cloud guid of the resource to remove |
SetAssetGuid(String, String)
Associate an asset guid to a cloud guid
Declaration
public void SetAssetGuid(string assetGuid, string cloudGuid)
Parameters
| Type | Name | Description |
|---|---|---|
| String | assetGuid | The asset guid to be associated to this cloud guid |
| String | cloudGuid | The cloud guid associated to this asset guid |