CesiumGS / cesium-unity

Bringing the 3D geospatial ecosystem to Unity
https://cesium.com/platform/cesium-for-unity/
Apache License 2.0
347 stars 83 forks source link

Fix warning when adding new DynamicCamera in the editor #393

Closed azrogers closed 8 months ago

azrogers commented 8 months ago

Fixes #321.

When adding a new DynamicCamera from the Cesium editor utility, it would pop up a warning that the camera wasn't parented to a CesiumGeoreference despite this being the case. By using the overload of Object.Instantiate that supports specifying the new object's parent transform, the DynamicCamera's parent will be set by the time it initializes, avoiding this warning.

j9liu commented 8 months ago

Thanks @azrogers !