Unity-Technologies / 2d-extras

Fun 2D Stuff that we'd like to share!
Other
1.56k stars 344 forks source link

NewCustomRuleTile.cs.txt template not found when trying to create a new Custom Rule Tile #237

Open jeango opened 4 years ago

jeango commented 4 years ago

Unity version: 2019.4.3f1 Branch: Unity2019.4

Problem description: When trying to create a new custom rule tile, I get an error:

FileNotFoundException: The template file "Packages/com.unity.2d.tilemap.extras/Editor/Tiles/RuleTile/ScriptTemplates/NewCustomRuleTile.cs.txt" could not be found. UnityEditor.ProjectWindowUtil.CreateScriptAssetFromTemplateFile (System.String templatePath, System.String defaultNewFileName) (at /Users/builduser/buildslave/unity/build/Editor/Mono/ProjectWindow/ProjectWindowUtil.cs:313) UnityEditor.CustomRuleTileMenu.CreateCustomRuleTile () (at Assets/Externals/2d-extras-2019.4/Editor/Menu/CustomRuleTileMenu.cs:10)

Analysis: It is trying to get a template file from the packages folder, while my 2d-extras were not installed using the package manager.

To reproduce: 1) download 2d-extras.zip (Unity 2019.4 branch) 2) unzip and import folder into unity 3) in project right click and in the context menu, select 2D>Tiles>Custom Rule Tile

ChuanXin-Unity commented 4 years ago

Sorry about this, will check it out!

ChuanXin-Unity commented 4 years ago

Could you check out the following changeset to see if that works for you? Thanks! https://github.com/Unity-Technologies/2d-extras/commit/e33074ec86c201f2679f93b1d1143cb9e25aac53