Save material (PlayMaker)

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
User avatar
SergeyRussia
Posts: 5
Joined: Mon Mar 02, 2020 8:19 pm

Save material (PlayMaker)

Post by SergeyRussia »

Hello.
When you try to save the material of the object, a message appears:
Save : FSM : Save : SaveMaterial : Texture 'normal' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

I go into the material properties and enable the box: Read / Write Enable

The error changes to:
Unsupported texture format - Texture2D::EncodeTo functions do not support compressed texture formats.
UnityEngine.ImageConversion:EncodeToPNG(Texture2D)

I convert the elements of the material from .jpg to .png - The error is the same.

Please tell me how to be?
Attachments
ErrorES-material.jpg
ErrorES-material.jpg (181.27 KiB) Viewed 8306 times
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save material (PlayMaker)

Post by Joel »

Hi there,

You need to use an uncompressed format in the import settings such as RGBA32 or ARGB32.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
User avatar
SergeyRussia
Posts: 5
Joined: Mon Mar 02, 2020 8:19 pm

Re: Save material (PlayMaker)

Post by SergeyRussia »

unfortunately then the images are magnified 8 times (((

I need to somehow save the material that the object uses, so that when loading it is again the material of this object.
I have a large number of textures, an increase in the project by 8 times is too much.
Maybe there is a solution? Something like save a path to materials?

Saving is going well, but for some reason on mobile devices it does not see saves, although in the project settings I specified SD cards.
Maybe I'm doing something wrong, because I see that your plugin is wonderful.

Thanks for the good support!
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save material (PlayMaker)

Post by Joel »

Hi there,

An alternative might be to put all of your Materials into an array, and then save the index of the Material in the array. Or if each Material will have a unique name, save the name of the Material and use this to lookup the Material from the list.

We've had no reports of it not working on mobile. Would you be able to check that there are no error messages output to the log?

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
User avatar
SergeyRussia
Posts: 5
Joined: Mon Mar 02, 2020 8:19 pm

Re: Save material (PlayMaker)

Post by SergeyRussia »

Thanks!
Finding an array of materials by name is a great solution!
It works!
Locked