#[repr(u32)]pub enum ClassId {
Show 34 variants
Material = 21,
Texture2D = 28,
Mesh = 43,
Shader = 48,
TextAsset = 49,
AnimationClip = 74,
AudioClip = 83,
Cubemap = 89,
AnimatorController = 91,
Font = 128,
PhysicMaterial = 134,
PhysicsMaterial2D = 62,
MonoBehaviour = 114,
MonoScript = 115,
Texture3D = 117,
RenderTexture = 84,
Sprite = 213,
SpriteAtlas = 687_078_895,
LightingSettings = 850_595_691,
NavMeshData = 238,
TerrainData = 156,
Avatar = 90,
AvatarMask = 1_011,
AnimatorOverrideController = 221,
AudioMixerController = 244,
Prefab = 1_001,
PrefabImporter = 1_002,
SceneAsset = 1_032,
LightingDataAsset = 1_120,
AssemblyDefinitionAsset = 1_153,
AssemblyDefinitionReferenceAsset = 1_374,
GameObject = 1,
Transform = 4,
RectTransform = 224,
}Expand description
Unity asset class IDs. repr(u32) — most fit in u16, but a few
post-2018 types (SpriteAtlas, LightingSettings) use 30-bit IDs.
Variants§
Material = 21
Texture2D = 28
Mesh = 43
Shader = 48
TextAsset = 49
AnimationClip = 74
AudioClip = 83
Cubemap = 89
AnimatorController = 91
Font = 128
PhysicMaterial = 134
PhysicsMaterial2D = 62
MonoBehaviour = 114
MonoScript = 115
Texture3D = 117
RenderTexture = 84
Sprite = 213
SpriteAtlas = 687_078_895
LightingSettings = 850_595_691
TerrainData = 156
Avatar = 90
AvatarMask = 1_011
AnimatorOverrideController = 221
AudioMixerController = 244
Prefab = 1_001
PrefabImporter = 1_002
SceneAsset = 1_032
LightingDataAsset = 1_120
AssemblyDefinitionAsset = 1_153
AssemblyDefinitionReferenceAsset = 1_374
GameObject = 1
Transform = 4
RectTransform = 224
Implementations§
Source§impl ClassId
impl ClassId
Sourcepub fn from_raw(raw: u32) -> Option<Self>
pub fn from_raw(raw: u32) -> Option<Self>
Lookup by raw u32 class ID — None if we don’t enumerate it. Bake-time fallback when we encounter a class ID not in the table.
Sourcepub fn name(self) -> &'static str
pub fn name(self) -> &'static str
Stable name string — what gets written to TSV legacy / debug output.
Sourcepub fn canonical_subobject_fid(self) -> i64
pub fn canonical_subobject_fid(self) -> i64
Canonical sub-object fileID Unity assigns to a single embedded
asset of this class. Encoding: class_id × 100_000. Stays in
this module per the project’s “no magic numbers” rule (file
header).
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for ClassId
impl<'__de, __Context> BorrowDecode<'__de, __Context> for ClassId
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
impl Copy for ClassId
impl Eq for ClassId
impl StructuralPartialEq for ClassId
Auto Trait Implementations§
impl Freeze for ClassId
impl RefUnwindSafe for ClassId
impl Send for ClassId
impl Sync for ClassId
impl Unpin for ClassId
impl UnsafeUnpin for ClassId
impl UnwindSafe for ClassId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more