mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
fix octree's minPos can't not be read normally while deserialize (#10112)
* fix octree's minPos can't not be read normally while deserialize
This commit is contained in:
@@ -750,7 +750,17 @@ function parseCustomClass (data: IFileData, owner: any, key: string, value: ICus
|
||||
}
|
||||
|
||||
function parseValueTypeCreated (data: IFileData, owner: any, key: string, value: IValueTypeData) {
|
||||
BuiltinValueTypeSetters[value[VALUETYPE_SETTER]](owner[key], value);
|
||||
/**BuiltinValueTypes index: Vec2=0, Vec3=1, Vec4=2, Quat=3, Color=4, Size=5, Rect=6, Mat4=7
|
||||
The native layer type corresponding to the BuiltinValueTypes has not been exported exclude Color,
|
||||
so we need to set to native after value changed
|
||||
* */
|
||||
if (JSB) {
|
||||
const tmp = owner[key];
|
||||
BuiltinValueTypeSetters[value[VALUETYPE_SETTER]](tmp, value);
|
||||
owner[key] = tmp;
|
||||
} else {
|
||||
BuiltinValueTypeSetters[value[VALUETYPE_SETTER]](owner[key], value);
|
||||
}
|
||||
}
|
||||
|
||||
function parseValueType (data: IFileData, owner: any, key: string, value: IValueTypeData) {
|
||||
|
||||
Reference in New Issue
Block a user