I am currently making a mod where if you're playing as a plantsim, you can click on the ground and create a "build-mode-plant".
Here are the code lines for that
Code: Select all
LotLocation invalid = LotLocation.Invalid;
GameObject gameObject = GlobalFunctions.CreateObject("PlantLavender,EP1,Sims3.Gameplay.Core.Null", Destination, invalid.mLevel, Vector3.UnitZ) as GameObject;
World.GetLotLocation(Destination, ref invalid);
However, I am having some troubles. When using the interaction in game, a white box is created at the location, saying "Missing object resource instance PlantLavender,EP1,Sims3.Gameplay.Core.Null"
However...
I have Nraas DebugEnabler installed and when I click on the ground and choose Nraas > Debug, and select "Create Object" and use the same line as in my code (PlantLavender,EP1,Sims3.Gameplay.Core.Null), the plant is created without any issues.
Does anyone have any idea why the plant won't be created with my mod when it can be created with DebugEnabler?