2D Toolkit Forum
2D Toolkit => Support => Topic started by: quangtu89 on February 02, 2015, 05:54:21 pm
-
I want change only a sprite in atlas to grayscale but dont affect to other sprites in this atlas . How to do this ?
-
Use a custom material on that sprite, assign a shader to it that draws in grayscale
-
can texture be load multi times if i use multiple material on a atlas.
-
No its only loaded once
-
To add to this, any compelling reason my atlas textures are loaded multiple times (if using multiple materials) according to this tool: http://forum.unity3d.com/threads/resource-checker-free-list-texture-material-mesh-memory-use-in-scene.132008/
A lot of people I know use it and it's pretty awesome in showing you what textures/materials you have loaded in your scene, but unless I'm missing something obvious, why are my atlas textures loaded into memory multiple times? Thanks.
-
Are you using png textures?
-
Nope, Unity.
-
It can't be right, Unity doesn't load an asset twice. You can't even make it do it, unless its deliberately instantiated multiple times but you'd have a "Clone" appended to the name.
I'd check in the unity profiler to be sure.
-
I'm getting similar results with the Unity profiler. I've attached two pictures, the first one is of the Resource Checker Util and the second is the Unity profiler. It seems I should only have 6 atlas textures loaded in, but Resource Checker is reporting 13, and Unity Profiler is saying 10. Thoughts? Many thanks.
-
What asset to each of those lead to when you click on it in the unity profiler?
-
Very strange, must be a bad bug going on. I have some old atlases being loaded in that are supposedly referenced by some sprites - if I select the references in the profiler, they take me to the sprites that are clearly not using the atlas. Not sure what's going on here.
-
My project started a long time ago and I've only slowly been working on it, but it's since become quite a mess and I'm always having odd issues - I think my best bet is to create a new project from scratch and then import only relevant assets. Do you have any recommendations for this process? I'd rather not have to re-create collections and animations, there should be no issues if I just export and import a package with all the sprite stuff, right?
-
If you have visible meta files, you can simply copy the sprite collection + data + animation prefabs + data directly to the other project. But yes exporting and importing will work too.