Wraps a Unity Material that is attached to a Compound Item This class maintains references to materials and textures for you
More...
|
void | SetReferencedItems (bool referenced) |
| Used to override the internal check for ReferenceItems and DereferenceItems This is ONLY useful if you're procedurally creating these assets yourself This will set the internal cache flag for reference counting w/o changing references More...
|
|
void | ReferenceItems (bool force=false) |
| Ensure that we increment the reference count for objects tied to this MaterialItem. This is necessary if the MaterialItem is created outside the normal processes, such as being cloned from an existing Material. More...
|
|
void | DereferenceItems () |
| Inverses reference counts for things like textures
|
|
void | OnBeforeSceneSerialize () |
| Fired before a scene is saved in the Unity Editor NOTE: this is never fired in runtime builds More...
|
|
void | OnAfterSceneDeserialize () |
| Fired after a scene has loaded NOTE: this IS fired in both the Unity Editor and runtime builds More...
|
|
bool | IsSceneSerialized () |
| Tells the system if the object has been serialized or not. This should report True if and only if OnBeforeSceneSerialize was triggered and serialized and it has not yet been deserialized More...
|
|
virtual CompoundItem | FindParentCompound () |
| Find the parent CompoundItem which this Item is attached to, if it exists, otherwise null
|
|
virtual AvatarItem | FindAvatarItem () |
| Returns the AvatarItem this item is attached to (if found, note may return null)
|
|
virtual RigItem | FindRigItem () |
| Finds the current RigItem associated on this Avatar Hierarchy More...
|
|
|
bool | DestroyTexturesOnDestroy = true |
| Whether the wrapped Unity Material should be freed when this class is freed
|
|
MaterialTarget | materialTarget |
| Stores representations of a material as meta data blocks.
|
|
SerializableDictionarySS | TextureMap = new SerializableDictionarySS() |
| Key is texture channel slot (eg: _MainTex), value is GUID of texture, eg: 123-456-abc
|
|
|
int | _unityInstanceId = 0 |
| We need to use these so we know if we're a copy, if we are we'll generate a new set of references
|
|
bool | _referencedItems = false |
|
bool | _isSceneSerialized = false |
|
List< string > | _trackingIds = null |
|
|
Material | UnityMaterial [getset] |
| Unity Material that this item wraps
|
|
virtual McsSdk20.Primitives.AstraPrimitiveType | PrimitiveType [get] |
| Retrieve the primitive type for this item
|
|
virtual McsSdk20.Primitives.SchematicType | SchematicType [get] |
| Retrieve the schematic type for this item
|
|
string | AstraGuid [getset] |
| Guid for this item to identify it in the Astra Service
|
|
string | AstraName [getset] |
| Display name for this item
|
|
string | AstraInstanceId [getset] |
| Guid representing an instance of this item
|
|
string | AstraGuid [getset] |
|
string | AstraName [getset] |
|
string | AstraInstanceId [getset] |
|
Wraps a Unity Material that is attached to a Compound Item This class maintains references to materials and textures for you
◆ IsSceneSerialized()
bool Astra.Asset.MaterialItem.IsSceneSerialized |
( |
| ) |
|
|
inline |
Tells the system if the object has been serialized or not. This should report True if and only if OnBeforeSceneSerialize was triggered and serialized and it has not yet been deserialized
- Returns
- True if we've manipulated the object for scene saving, false otherwise
Implements Astra.Asset.ISceneSerializable.
◆ OnAfterSceneDeserialize()
void Astra.Asset.MaterialItem.OnAfterSceneDeserialize |
( |
| ) |
|
|
inline |
◆ OnBeforeSceneSerialize()
void Astra.Asset.MaterialItem.OnBeforeSceneSerialize |
( |
| ) |
|
|
inline |
◆ ReferenceItems()
void Astra.Asset.MaterialItem.ReferenceItems |
( |
bool |
force = false | ) |
|
|
inline |
Ensure that we increment the reference count for objects tied to this MaterialItem. This is necessary if the MaterialItem is created outside the normal processes, such as being cloned from an existing Material.
- Parameters
-
force | If true, will increase references even if already set |
◆ SetReferencedItems()
void Astra.Asset.MaterialItem.SetReferencedItems |
( |
bool |
referenced | ) |
|
|
inline |
Used to override the internal check for ReferenceItems and DereferenceItems This is ONLY useful if you're procedurally creating these assets yourself This will set the internal cache flag for reference counting w/o changing references
- Parameters
-
◆ _proceduralTextureProperties
List<string> Astra.Asset.MaterialItem._proceduralTextureProperties |
|
staticprotected |
Initial value:= new List<string>(){
"_AlphaTex",
"_DecalTex",
"_DecalNormal",
"_DecalGlossMap",
}
The documentation for this class was generated from the following file:
- Assets/Astra/Asset/Material/MaterialItem.cs