Cammin / LDtkToUnity

Unity importer for the LDtk level editor
https://cammin.github.io/LDtkToUnity
MIT License
388 stars 39 forks source link

Assembly error - again #7

Closed AndyGFX closed 3 years ago

AndyGFX commented 3 years ago

Hi, sorry but on another place.

Assets\Tests\Editor\FieldDeserializeTest.cs(7,7): error CS0246: The type or namespace name 'Samples' could not be found (are you missing a using directive or an assembly reference?)

I have used fresh code from github rep. and with Unity 2020.3.0f1 LTS.

Cammin commented 3 years ago

Ah, I understand what is happening. You have downloaded the repo as a .zip?

The repo itself is just used as my development environment and utilizes a symbolic link to reference the samples folder. I chose to do this so that the samples folder is hidden from the project view, but with the ability to still be contained in the packages directory and installable for OpenUPM (the folder is named "Samples~", the squiggly character at the end of a folder makes it invisible to Unity)

What what I believe is the problem for every repo download, is that the symbolic link was not created correctly when downloading the repo (I've had this problem before too when getting my repo on multiple computers), and so the samples folder would not be visible by Unity.

A solution you can apply right now is to rename the Samples~ folder into Samples, and that may fix the problem. image

But what I'll do as a compromise, is to not make any assembly definitions reference any of the samples, and that should help fix the problem even if the entire repo is used from scratch.

The correct way of installing the package can be found in the installation section of the wiki: https://github.com/Cammin/LDtkUnity/wiki/Install

Let me know if this helped :)

Cammin commented 3 years ago

After thinking about it more, did you try installing with a .unitypackage originally? That's totally my fault for not testing that option of installing. 😅

Edit: Turns out that the .unitypackage installation process is completely broken from my own testing, so I'm going to remove that as an option from the docs.

AndyGFX commented 3 years ago

Hi, I tried make local copy of your repo instead zip and now is all without errors. I have now installed OpenUPM-CLI too, for updates in future.

Cammin commented 3 years ago

Awesome 😎