mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Instantiate inactive why not
This commit is contained in:
parent
fbbaeb4fb6
commit
d395a002cd
@ -36,7 +36,8 @@ namespace NewHorizons.Builder.Body
|
|||||||
|
|
||||||
var radius = module.radius;
|
var radius = module.radius;
|
||||||
|
|
||||||
var newCloak = Object.Instantiate(_prefab, sector?.transform ?? planetGO.transform);
|
var newCloak = _prefab.InstantiateInactive();
|
||||||
|
newCloak.transform.parent = sector?.transform ?? planetGO.transform;
|
||||||
newCloak.transform.position = planetGO.transform.position;
|
newCloak.transform.position = planetGO.transform.position;
|
||||||
newCloak.transform.name = "CloakingField";
|
newCloak.transform.name = "CloakingField";
|
||||||
newCloak.transform.localScale = Vector3.one * radius;
|
newCloak.transform.localScale = Vector3.one * radius;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user