Code: Select all
foreach (DaggerfallRMBBlock block in blockArray)
{
Vector3 blockPosition = block.transform.position;
Debug.LogError("Block Position: " + blockPosition);
//setup a new static buildings object to hold the rmb blocks static buildings object.
DaggerfallStaticBuildings staticBuildingContainer = block.GetComponentInChildren<DaggerfallStaticBuildings>();
Debug.LogError("Static Building Container: " + staticBuildingContainer.name);
//if there are not any buildings in this block, stop code from crashing script and return.
if (staticBuildingContainer == null)
continue;
I know this because the Debug.LogError("Static Building Container: " + staticBuildingContainer.name); returns a null error in the player.log and my built in null error return catcher stopped the mod from crashing by detecting the null and stopping the marker code from going any further.
Anyone have an idea if there has been any changes related to how the RMBblocks and the DaggerfallStaticBuilding script is working?
I'm going to try and figure out if I can pull it another way, but I'm a little lost, as in the editor, it shows this component/script attached to each RMBBlock under the current location component, but it clearly isn't in the build version.
*EDIT*
I've tried pulling it from the streaming world object, from the location object, and still now luck. So odd it works fine in editor, but not in build version.