Skip to content
Permalink
Browse files

feat(redo-undo): fix deep copy gameObject: add copy disposedScriptArray

  • Loading branch information...
yyc-git committed Apr 7, 2019
1 parent ecae5e7 commit d06d0f7aaa0615851f4c30e3c2e6d519e21ffaf4
@@ -76,6 +76,7 @@ let deepCopyForRestore =
disposedDirectionLightArray,
disposedPointLightArray,
disposedMeshRendererComponentArray,
disposedScriptArray,
aliveUidArray,
geometryMap,
transformMap,
@@ -146,6 +147,8 @@ let deepCopyForRestore =
disposedMeshRendererComponentArray:
disposedMeshRendererComponentArray
|> WonderCommonlib.MutableSparseMapService.copy,
disposedScriptArray:
disposedScriptArray |> WonderCommonlib.MutableSparseMapService.copy,
aliveUidArray: aliveUidArray |> WonderCommonlib.MutableSparseMapService.copy,
geometryMap: geometryMap |> WonderCommonlib.MutableSparseMapService.copy,
transformMap: transformMap |> WonderCommonlib.MutableSparseMapService.copy,
@@ -576,14 +576,17 @@ let _ =

describe("deep copy gameObject record", () =>
test(
"shadow copy
{|shadow copy
nameMap,
isRootMap,
disposedUidMap,\n\n disposedUidArray,\n disposedUidArrayForKeepOrder,
disposedUidMap, disposedUidArray, disposedUidArrayForKeepOrder,
disposedUidArrayForKeepOrderRemoveGeometry,
disposedUidArrayForKeepOrderRemoveGeometryRemoveMaterial,
\n disposedBasicCameraViewArray,\n disposedTransformArray,\n disposedTransformArrayForKeepOrder,\n disposedPerspectiveCameraProjectionArray,\n disposedBasicMaterialDataMap,\n disposedLightMaterialDataMap,\n disposedGeometryDataMap,\n disposedSourceInstanceArray,\n disposedObjectInstanceArray,\n disposedDirectionLightArray,\n disposedPointLightArray,\n disposedMeshRendererComponentArray,\n disposedMeshRendererUidArray,\n \n \n aliveUidArray, transformMap, basicCameraViewMap, geometryMap, meshRendererMap, basicMaterialMap, lightMaterialMap, directionLightMap, pointLightMap, sourceInstanceMap, objectInstanceMap, scriptMap",
disposedBasicCameraViewArray, disposedTransformArray, disposedTransformArrayForKeepOrder, disposedPerspectiveCameraProjectionArray, disposedBasicMaterialDataMap, disposedLightMaterialDataMap, disposedGeometryDataMap, disposedSourceInstanceArray, disposedObjectInstanceArray, disposedDirectionLightArray, disposedPointLightArray, disposedMeshRendererComponentArray,
disposedScriptArray,
disposedMeshRendererUidArray, aliveUidArray, transformMap, basicCameraViewMap, geometryMap, meshRendererMap, basicMaterialMap, lightMaterialMap, directionLightMap, pointLightMap, sourceInstanceMap, objectInstanceMap, scriptMap|},
() =>
StateDataMainType.(
GameObjectType.(
@@ -609,6 +612,7 @@ let _ =
disposedDirectionLightArray,
disposedPointLightArray,
disposedMeshRendererComponentArray,
disposedScriptArray,
aliveUidArray,
transformMap,
basicCameraViewMap,
@@ -644,6 +648,7 @@ let _ =
disposedDirectionLightArray |> Obj.magic,
disposedPointLightArray |> Obj.magic,
disposedMeshRendererComponentArray |> Obj.magic,
disposedScriptArray |> Obj.magic,
aliveUidArray |> Obj.magic,
transformMap |> Obj.magic,
basicCameraViewMap |> Obj.magic,

0 comments on commit d06d0f7

Please sign in to comment.
You can’t perform that action at this time.