How to set what File Types are auto-incuded in a Unity 3D Project

Answered

I am using Rider for a Unity 3D Project, but I need to be able to see .json and .png (and probably other file types later) to show in my Solution Explorer.

 

I can see these files if I set the option "Show All Files" but then it shows all those pesky .meta files and and .prefab files. I can also manually Include individual files, but I don't want to do this for every file.

I can't find any dialog box that lets me configure this kind of thing.

 

Also.. I'd like to see empty directory folders in my Solution Explorer as well. 

 

Thanks

0
7 comments

Hi!
You would need to patch  RiderAssetPostProcessor in https://github.com/JetBrains/Unity3dRider

modify each csproj with

<Content Include = "**\*.json"/>  

That must be enough.

Feel free to make a pull request or issue on github.

Ivan

Edit: Fix Compile to Content and slightly path

0
Avatar
Permanently deleted user

Okay, I installed the plug in, plus RiderUnity3DConnector. Just to be save, I shut down Rider, deleted the .idea folder plus the solution files from my project, and then reopened it through the Unity IDE under Assets -> Open C# Project in Rider. And it loaded up the project.

Stilll my .json, .png, and empty folders issue persists.

 

When you say I need to path RiderAssetPostProcessor, exactly what do I need to do? I see some methods related to loading files, but I don't understand how it works to allow certain file types to show in the project.

 

 

Edit: Oops, I didn't see your tip to add that compile element to the xml.. I just add it, and I still don't see the .json files

Edit 2: I just noticed that whenever i re-open Rider, it removes those lines from the .csproj files

0

I have made modifications related to json files in branch
https://github.com/JetBrains/Unity3dRider/tree/include.ison
Try it, polish it, make a pull request.
Regarding the question about regeneration of csproj and sln files - it is done by Unity, not by Rider.
Unity3dRider is a plugin to Unity which uses a Unity extension point to modify sln and csproj files generated by Unity.
Ivan

0
Avatar
Permanently deleted user

This does the trick!

 

I cloned the include.ison branch, included support for images, audio files, and 3d assets (some people like to see these files in their IDE for quick reference to file names).

 

When I try to push my commit, I get a 403 "remote permission denied" error. I'm a bit of a git noob so I'm not sure if I'm configured wrong on my end, or if I need access to push. If its the latter, my gitHub Email Address is Garmichael at google's free email domain 

0

You would need to Fork the repo first on github. Then checkout, make your changes, commit, push and then make a pull request.

0
Avatar
Permanently deleted user

Awesome, I figured it out! Thanks for your help

0

Please sign in to leave a comment.