More actions
Spacewarp>ShadowDev fiix |
Spacewarp>ShadowDev No edit summary |
||
Line 4: | Line 4: | ||
VesselComponent vesselComponent = GameManager.Instance.Game.UniverseModel.GetAllVessels().Where((vessel) => vessel.Name == "Vessel Name Here").First(); | VesselComponent vesselComponent = GameManager.Instance.Game.UniverseModel.GetAllVessels().Where((vessel) => vessel.Name == "Vessel Name Here").First(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Game systems]] |
Revision as of 18:50, 31 May 2023
the UniverseModel contains everything that the game knows about.
How to get a Vessel by name using UniverseModel
VesselComponent vesselComponent = GameManager.Instance.Game.UniverseModel.GetAllVessels().Where((vessel) => vessel.Name == "Vessel Name Here").First();