I can find all the red brick models and I can differentiate that based on if they have an action or not. However, I can not figure out how to edit the texture of the model. My Silly-but-works solution at the moment is to simply create a small grey wall texture from vanilla and matching its rotation and position so it matches the red brick wall I want to stay a wall.
However, I would prefer if it was possible to just switch out the texture on the existing model.
Anyone have any ideas how to do this?
Code: Select all
foreach (MeshCollider wall in brickWalls)
{
if (wall.name == "DaggerfallMesh [ID=72100]")
{
wallObj = wall.transform.gameObject;
if (wallObj.GetComponent<DaggerfallAction>().ActionFlag == DFBlock.RdbActionFlags.Teleport)
{
//Teleporter
}
else
{
//Not Teleporter
//Code for switching out the red brick wall texture goes here.
}
}
}