Coder Social home page Coder Social logo

Comments (13)

paulboutros avatar paulboutros commented on September 24, 2024 1

Hi Seanba! Thanks for the wonderful work! I have been using an old version of Tile2Unity for few week and it was working perfectly until the 1.0.6.0 version.What's happening is that when a map is imported (or re imported) ALL other map have their material component deleted or removed. (I am also using the same material for multiple obj for optimization sake)

from tiled2unity.

Seanba avatar Seanba commented on September 24, 2024

By any chance were you exporting into Unity as the editor was "playing"
your scene? If not, and you see this bug again, please let me know. I
normally wouldn't expect you to have to restart Unity.

Best,
Sean

On Sat, Jun 11, 2016 at 2:19 AM, whiskership [email protected]
wrote:

Closed #40 #40.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#40 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AGqEFqDy4rIoxCGfP4Jyn2dlqlBOSnQkks5qKmGZgaJpZM4IzfbR
.

from tiled2unity.

whiskership avatar whiskership commented on September 24, 2024

Hi I thought the problem was solved but it actually isn't.

The editor wasn't playing when exporting into Unity.

Every time I export a map into Unity all the other maps turn pink. The only way to fix it is by restarting Unity and all the maps are back to normal. But if export another map they all turn pink again.

I've tried exporting into different projects and exporting different maps and the problem continues.

from tiled2unity.

Seanba avatar Seanba commented on September 24, 2024

Hmmm are your maps using the same texture? One recent "feature" is that materials are recreated during import so maybe that's causing this?

Sent from my iPhone

On Jun 11, 2016, at 9:50 PM, whiskership [email protected] wrote:

Hi I thought the problem was solved but it actually isn't.

The editor wasn't playing when exporting into Unity.

Every time I export a map into Unity all the other maps turn pink. The only way to fix it is by restarting Unity and all the maps are back to normal. But if export another map they all turn pink again.

I've tried exporting into different projects and exporting different maps and the problem continues.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from tiled2unity.

whiskership avatar whiskership commented on September 24, 2024

Yes they are using the same texture. And if I go into the Tiled2Unity folder there is only one material for all the maps, which makes sense because they use the same texture.

from tiled2unity.

Seanba avatar Seanba commented on September 24, 2024

Try this Unity package in your project and see if it fixes it.

https://dl.dropboxusercontent.com/u/44608487/Tiled2Unity.1.0.6.0.unitypackage

This should create the materials only when needed, otherwise it will overwrite what is already there but in a way that keeps links from prefabs valid.

from tiled2unity.

paulboutros avatar paulboutros commented on September 24, 2024

this following line (inside the "CreateOrReplaceAsset" function )gets an error:
T existingAsset = AssetDatabase.LoadAssetAtPath(path);

Assets/Tiled2Unity/Scripts/Editor/ImportUtils.cs(133,46): error CS1501: No overload for method LoadAssetAtPath' takes1' arguments

from tiled2unity.

seanb-22ct avatar seanb-22ct commented on September 24, 2024

What version of Unity are you using, Paul?

On Mon, Jun 13, 2016 at 4:33 PM, paulboutros [email protected]
wrote:

this following line (inside the "CreateOrReplaceAsset" function )gets an
error:
T existingAsset = AssetDatabase.LoadAssetAtPath(path);

Assets/Tiled2Unity/Scripts/Editor/ImportUtils.cs(133,46): error CS1501: No
overload for method LoadAssetAtPath' takes1' arguments


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#40 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ARrfhRI0tpLQf1_EMeEznyv65NqiWiYuks5qLcy8gaJpZM4IzfbR
.

from tiled2unity.

paulboutros avatar paulboutros commented on September 24, 2024

5.0.1.11919

from tiled2unity.

Seanba avatar Seanba commented on September 24, 2024

That override must be a newer addition to Unity then. Do you mind replacing
the line that fails to compile with this?

T existingAsset = (T)AssetDatabase.LoadAssetAtPath(path, typeof(T));

Thanks,
Sean

On Mon, Jun 13, 2016 at 4:41 PM, paulboutros [email protected]
wrote:

5.0.1.11919


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#40 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGqEFr6EU0F7i-F92Cax7rOjOGi62W4yks5qLc6NgaJpZM4IzfbR
.

from tiled2unity.

paulboutros avatar paulboutros commented on September 24, 2024

Well the miracle happened Sean. The bug is gone I re-imported 3 maps sharing the same material and it all works properly!
Awesome.
Thanks,

Paul

from tiled2unity.

Seanba avatar Seanba commented on September 24, 2024

Thank you, Paul. I will push out the version that supports current and past versions of Unity soon and close the bug then.

from tiled2unity.

whiskership avatar whiskership commented on September 24, 2024

Hey Sean the Unity package worked perfectly for me with no errors and didn't have to change any code. I can now import new maps without the other ones turning pink (they are all using the same texture same as before). Using Unity 5.3.5 p2. Thanks a lot!

from tiled2unity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.