Texture2D error when entering dungeon [RESOLVED]

Locked
R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Texture2D error when entering dungeon [RESOLVED]

Post by R.D. »

I always get errors and warnings in the Unity log when entering the dungeon "The Temple of Maelon" in the Wayrest region.

The log says:
SetPixels32 called with invalid number of pixels in the array
UnityEngine.Texture2D:SetPixels32(Color32[])
DaggerfallWorkshop.Utility.TextureReader:GetTexture2D(GetTextureSettings, SupportedAlphaTextureFormats, SupportedNonAlphaTextureFormats, Boolean) (at Assets/Scripts/Utility/TextureReader.cs:223)
DaggerfallWorkshop.MaterialReader:GetMaterial(Int32, Int32, Int32, Int32, Rect&, Int32, Boolean, Boolean) (at Assets/Scripts/MaterialReader.cs:319)
DaggerfallWorkshop.MaterialReader:GetMaterial(Int32, Int32, Int32, Int32) (at Assets/Scripts/MaterialReader.cs:261)
DaggerfallWorkshop.DaggerfallMesh:SetDungeonTextures(Int32[]) (at Assets/Scripts/Internal/DaggerfallMesh.cs:189)
DaggerfallWorkshop.Utility.RDBLayout:CreateBaseGameObject(DFBlock&, Dictionary`2, Int32[], Boolean, DaggerfallRDBBlock, Boolean) (at Assets/Scripts/Utility/RDBLayout.cs:192)
DaggerfallWorkshop.Utility.RDBLayout:CreateBaseGameObject(String, Dictionary`2, DFBlock&, Int32[], Boolean, DaggerfallRDBBlock, Boolean) (at Assets/Scripts/Utility/RDBLayout.cs:115)
DaggerfallWorkshop.Utility.GameObjectHelper:CreateRDBBlockGameObject(String, Int32[], Boolean, DungeonTypes, Single, Int32, Int32, DaggerfallRDBBlock) (at Assets/Scripts/Utility/GameObjectHelper.cs:479)
DaggerfallWorkshop.DaggerfallDungeon:LayoutDungeon(DFLocation&) (at Assets/Scripts/Internal/DaggerfallDungeon.cs:251)
DaggerfallWorkshop.DaggerfallDungeon:SetDungeon(DFLocation) (at Assets/Scripts/Internal/DaggerfallDungeon.cs:107)
DaggerfallWorkshop.Utility.GameObjectHelper:CreateDaggerfallDungeonGameObject(DFLocation, Transform) (at Assets/Scripts/Utility/GameObjectHelper.cs:1099)
DaggerfallWorkshop.Game.PlayerEnterExit:TransitionDungeonInterior(Transform, StaticDoor, DFLocation, Boolean) (at Assets/Scripts/Game/PlayerEnterExit.cs:525)
DaggerfallWorkshop.Game.PlayerActivate:Update() (at Assets/Scripts/Game/PlayerActivate.cs:254)
and
Invalid width (0) or height (0) used for creating mipmaps.
UnityEngine.Texture2D:Apply(Boolean, Boolean)
DaggerfallWorkshop.Utility.TextureReader:GetTexture2D(GetTextureSettings, SupportedAlphaTextureFormats, SupportedNonAlphaTextureFormats, Boolean) (at Assets/Scripts/Utility/TextureReader.cs:224)
DaggerfallWorkshop.MaterialReader:GetMaterial(Int32, Int32, Int32, Int32, Rect&, Int32, Boolean, Boolean) (at Assets/Scripts/MaterialReader.cs:319)
DaggerfallWorkshop.MaterialReader:GetMaterial(Int32, Int32, Int32, Int32) (at Assets/Scripts/MaterialReader.cs:261)
DaggerfallWorkshop.DaggerfallMesh:SetDungeonTextures(Int32[]) (at Assets/Scripts/Internal/DaggerfallMesh.cs:189)
DaggerfallWorkshop.Utility.RDBLayout:CreateBaseGameObject(DFBlock&, Dictionary`2, Int32[], Boolean, DaggerfallRDBBlock, Boolean) (at Assets/Scripts/Utility/RDBLayout.cs:192)
DaggerfallWorkshop.Utility.RDBLayout:CreateBaseGameObject(String, Dictionary`2, DFBlock&, Int32[], Boolean, DaggerfallRDBBlock, Boolean) (at Assets/Scripts/Utility/RDBLayout.cs:115)
DaggerfallWorkshop.Utility.GameObjectHelper:CreateRDBBlockGameObject(String, Int32[], Boolean, DungeonTypes, Single, Int32, Int32, DaggerfallRDBBlock) (at Assets/Scripts/Utility/GameObjectHelper.cs:479)
DaggerfallWorkshop.DaggerfallDungeon:LayoutDungeon(DFLocation&) (at Assets/Scripts/Internal/DaggerfallDungeon.cs:251)
DaggerfallWorkshop.DaggerfallDungeon:SetDungeon(DFLocation) (at Assets/Scripts/Internal/DaggerfallDungeon.cs:107)
DaggerfallWorkshop.Utility.GameObjectHelper:CreateDaggerfallDungeonGameObject(DFLocation, Transform) (at Assets/Scripts/Utility/GameObjectHelper.cs:1099)
DaggerfallWorkshop.Game.PlayerEnterExit:TransitionDungeonInterior(Transform, StaticDoor, DFLocation, Boolean) (at Assets/Scripts/Game/PlayerEnterExit.cs:525)
DaggerfallWorkshop.Game.PlayerActivate:Update() (at Assets/Scripts/Game/PlayerActivate.cs:254)
Last edited by R.D. on Mon Oct 23, 2017 3:47 pm, edited 1 time in total.

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: Texture2D error when entering dungeon

Post by R.D. »

More information.

I found that the problem is happening with three textures:
Archive 422 Record 5
Archive 422 Record 9
Archive 422 Record 6

Archive 422 is "Swamp Dungeons A" and only has records 0-4.

Also, I found where in the dungeon these, or at least some of these textures are not being used. It's in a part with a waterway.
Texture Problem.jpg
Texture Problem.jpg (59.89 KiB) Viewed 1885 times
Attachments
Texture Problem Save.zip
(92.56 KiB) Downloaded 137 times

Locked