Page 1 of 1

Read/Write enabled? Clarification needed pls

Posted: Mon Mar 04, 2024 1:11 am
by King of Worms
Hi,

What are the exact rules for flagging the sprites/textures as Read/Write enabled?
What specific assets need to be flagged like this?

Example of the log:

Texture GNRC01I0.IMG is not readable.
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

So what does that mean? Does it mean I need to flag it as Read/Write enabled?
What happens when I dont?

Re: Read/Write enabled? Clarification needed pls

Posted: Mon Mar 04, 2024 1:58 am
by Kab the Bird Ranger
In my experience, DFU is pretty poor at this requirement. When code doesn't think about whether they need the texture to be readable or not, it tends to default to asking for a readable texture.

For example, when I did changes to enable custom textures in mobiles, I accidentally required readable textures, and that made Enemy Expansion spam logs with these. I fixed this in 1.1.

As far as I know, the only place where I heard that a readable texture was truly required are the paperdoll textures. For the rest, your choice is either 1) ignore the log 2) take the cost and enable Read/Write Enabled on your textures. This will put a copy of your texture on the CPU, increasing its memory usage and potentially requiring Unity to do extra processing around it.

If you can compile a list of textures that output this warning, we can put it on an issue tracker and get someone to proof check all of these. As I said, ignore the mobiles, that one I've already fixed

Re: Read/Write enabled? Clarification needed pls

Posted: Mon Mar 04, 2024 3:21 pm
by King of Worms
Thanks for a reply.

From the old info I got from The Lacus, read/write should be enabled in case that:
- a sprite is from the terrain assets (trees, flowers etc)
- is a animated animal or animated sprite in general
- is a overlay of another texture (like a lot of assets in the HUD)
- is paperdoll


So on my side, I have the flag enabled on
- whole paperdoll
- all animals
- all animated lights
- all terrain sprites
- most of the animated sprites excluding NPCs
- lots of HUD elements
- none of the Handheld

I got some warning on assets like:
TFAC... - so checking if portraits including FACES.CIF should be read/write enabled would be cool
Animated HUD elements like Spinning coins (380_6-0 + 434_6-0) & Magic effect (380_5-0 + 434_5-0)

Some HUD assets which overlay (are over-layed by) other assets like
SHOP00I0.IMG
GNRC01I0.IMG
REPR01I0.IMG

INVE16I0.CIF_4-0
INVE16I0.CIF_6-0
INVE16I0.CIF_7-0
INVE16I0.CIF_9-0 (so this is basically all these INVE-CIF assets whenever they appear ingame)

Some sprites:
207_16-0 (so this is basically the whole 207 archive)

EDIT:
I have also warning on the MOBs...

Re: Read/Write enabled? Clarification needed pls

Posted: Tue Mar 05, 2024 9:27 pm
by Kab the Bird Ranger
Thanks, I'll log something soon.
EDIT:
I have also warning on the MOBs...
Yup I fixed this for 1.1 already. I can send you a test build for the next one

Re: Read/Write enabled? Clarification needed pls

Posted: Wed Mar 06, 2024 10:24 am
by King of Worms
Sure, thanks!