Class RecipeObjectReferenceCodec
Encodes an object reference as the text a recipe carries, and resolves that text back to the object: a main
asset is its bare asset path, a sub-asset (a mixer group, a sprite in a sheet) is its asset path and local file
id joined by SubAssetSeparator. The object-reference half of RecipeSerializedPropertyCodec.
Inheritance
RecipeObjectReferenceCodec
Assembly: Serenity.UnityProjectRecipe.Infrastructure.Editor.dll
Syntax
public static class RecipeObjectReferenceCodec
Fields
SubAssetSeparator
Separates an asset path from the local file id of the sub-asset it names
(Assets/Audio/Main.mixer#6842158004252729940); a main asset is encoded as its bare path.
Declaration
public const char SubAssetSeparator = '#'
Field Value
Methods
Encode(Object)
The recipe text for reference: empty for none, the asset path for a main asset,
the path and local file id for a sub-asset.
Declaration
public static string Encode(Object reference)
Parameters
| Type |
Name |
Description |
| Object |
reference |
|
Returns
Resolve(string, List<string>)
The object encoded names, or null — with a warning when the text named an asset
that is not there.
Declaration
public static Object Resolve(string encoded, List<string> warnings)
Parameters
Returns