mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(UnityObject): added Type property.
This commit is contained in:
@@ -198,15 +198,23 @@ namespace GameRes.Formats.Unity
|
||||
reader.ReadByte();
|
||||
}
|
||||
|
||||
public string Type {
|
||||
public string TypeName {
|
||||
get {
|
||||
var type_tree = Asset.Tree.TypeTrees;
|
||||
if (type_tree.ContainsKey (TypeId))
|
||||
return type_tree[TypeId].Type;
|
||||
var type = this.Type;
|
||||
if (type != null)
|
||||
return type.Type;
|
||||
return string.Format ("[TypeId:{0}]", TypeId);
|
||||
}
|
||||
}
|
||||
|
||||
public TypeTree Type {
|
||||
get {
|
||||
TypeTree type;
|
||||
Asset.Tree.TypeTrees.TryGetValue (TypeId, out type);
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString ()
|
||||
{
|
||||
return string.Format ("<{0} {1}>", Type, ClassId);
|
||||
@@ -260,6 +268,8 @@ namespace GameRes.Formats.Unity
|
||||
}
|
||||
else if ("int" == node.Type)
|
||||
obj = input.ReadInt32();
|
||||
else if ("unsigned int" == node.Type)
|
||||
obj = input.ReadUInt32();
|
||||
else if ("bool" == node.Type)
|
||||
obj = input.ReadBool();
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user