Packages folder is empty? - unity3d

My entire project runs fine, but I'm trying to install and work with URP. I need to grab something from its Packages subfolder, but my entire project's Packages folder is entirely empty. Am I doing something wrong?

It might just be the visibility toggle that's in "hide immutable mode".
All recent Unity versions hide Packages that are imported in an immutable way. In the Project View though there's an icon that tells how many items are hidden (or that could be hidden because immutable and currently visible) and a barred eye. Clicking that toggles the visibility of such items.

Imported packages can be found at Library/PackageCache. If you need to modify an asset from a package, you can move that package to Packages folder via file explorer.

Related

How to Share new SteamVR ActionSets and Bindings between Unity Projects

I'm developing a VR module in Unity that I hope to be able to import into any of my unity projects as an asset package. This package requires defining input from a Vive controller button to turn it on during gameplay. I would like to somehow share this actionset and button binding between projects so I don't have to manually create the actions and bindings each time I would like to use it.
Is there any way to share SteamVR input settings between projects? Specifically one whole input actionset, and its associated controller bindings.
I've tried exporting the SteamVR_Input folder as a package, also tried with including SteamVR folder, neither worked. After reimport, I can see the imported actionset in the project folder in the SteamVR_Input folder, but it isn't showing up in the input window (Window Menu -> SteamVr Input). However, the live input view shows the actions in the list, but doesn't register any button presses.
Update Unity 2019.2:
This seems to be fixed now.
In the source project, go to SteamVR Input window, click advanced.
Create a partial bindings folder. Rename it to what you want. Note that it will automatically add a SteamVR_ prefix. So my default name had SteamVR_SteamVR_ at the start. I needed to delete the suggested name and just name it my project's name.
It creates it in the base folder for your project, NOT the assets folder for some reason.
In Windows Explorer, drag it into Assets folder of source project.
In Unity editor (source project) it should now prompt you to import settings, but it detects that these actions already exist. Click Merge.
Make sure your actionset is still there in SteamVR input window.
Now you can export a unitypackage from this folder.
Now you can import the unitypackage in the destination project, and it should prompt you after import to load the actions! Yay.
Note: I ran into an issue if I renamed the partial bindings folder after creation. It would not recognize it as actions anymore and not prompt to import. To rename the partial bindings folder, you need to recreate it and follow the above steps again.
OLD ANSWER (outdated) :
Note: this answer is working based on a Beta version of the SteamVR plugin 2.2b4. It may change in a future release
Ok I got this working. It's still not quite possible as far as I can tell to create a unitypackage with the bindings and actions inside, but it's much better than before.
To move an ActionSet and bindings from project 1 to project 2:
In the first project: Create a new action set with your desired actions and bindings.
Go to Window Menu > SteamVR input
click Advanced settings, then click Create. This will create a folder in your project somewhere.
This is where the problem is. This folder can't seem to be packaged. BUT:
Important: In your 2nd project delete the SteamVR_Input folder (you may want to back it up just in case)
Drag this created folder from the 1st project (from windows explorer) into the Assets folder in the project view of the 2nd project (open in Unity). If you do this outside of unity it will not work.
It will prompt you to import the "partial bindings" and will add your custom ActionSet to this other project. Open Window Menu > SteamVR_Input in the 2nd project and then you should see your imported ActionSet at the top. Click "Save and Generate" to recreate a new SteamVR_Input Folder for this project.
Voila! It should work.
I haven't got it to be able to be packaged in an asset package yet.
After spending a lot of frustrating hours I discovered the following simple procedure.
(In Unity 2019.1.14f1 and I suspect it will work in higher versions as well).
In project 1:
It is crucial after editing your bindings in the SteamVR graphical interface to choose
Replace Default Binding
The result of this is that your bindings are completely saved in
Assets/StreamingAssets/SteamVR
(by default, but this is a perfectly good location)
This by the way, is also required if you want to use your bindings in a standalone build.
In project 2:
Copy, via the file system or via export and import custom package, the StreamingAssets/SteamVR folder from project 1 to the corresponding location in project 2.
As of that moment your bindings are available in project2!

Cannot get class-files from Java-package in eclipse

I have a webapp containing some Java-classes within some packages. However within Package-Explorer only the names of the packages are listed, but I cannot get the classes within them. Thus the icon for the package stays empty meaning there is no content within the package.
When I manually drag a class from the WinExplorer into the Package-Explorer I get a warning that the class is already contained in the package. Having said this the package is not empty, however I cannot get any of its classes.
Check Project-->Properties-->Java Build Path-->Sources tab.
Make sure that "Included" is properly set (Usually to "All").
Also check that the "Filter" (little triangle icon) is not hiding the required code sources.
You can also try to "New-->Java Project" than use the existing sources.

How do I make eclipse (Indigo) collapse empty (parent) packages?

What I want to do is simply use the eclipse package explorer in hierarchical view but with empty packages being collapsed so I don't have to open 5+ packages to find the first Java file.
I'm not even sure how I did it in previous versions, but I've never had any trouble finding it before, it just seems to be gone now. I have a feeling there was a "flatten hierarchy" tick-box somewhere.
To clarify I get this:
com
example
etc
file1.java
Rather than:
com.example.etc
file1.java
I'm using Eclipse Indigo (v. 3.7.1)
Open the View menu (small triangle in top right corner), open filters and check Empty parent packages.
In most cases it works, but in case of existing projects it does not always work as expected. If you seem to have troubles, try to export the project, remove it, then re-add the exported version (or re-checkout from your VCS).
Assuming the view filter is engaged properly, perhaps your source folders are not as "empty" as you think.
For example, on Apple OS X, Eclipse will detect .DS_STORE entires along your src/package/hierarchy, making the parent packages technically non-empty.
Delete any such hidden files and refresh your project.
Window - Preferences - Java - Appearance - Abbreviate package names
And enter the following rule:
com.example.etc={cee}
I don't know what the problem actually was, but I couldn't get it fixed until I gave up altogether and reinstalled the OS (it was a fresh install anyway), and eclipse. It was completely fine after that. :\
Click on the arrow at the top right of the "Package explorer" and choose "Package presentation -> flat"
Try to restart Eclipse once in a while. I had trouble getting it to work, and after an Eclipse restart it suddenly was working again.

Moving packages eclipse

Maybe a stupid question but I have two packages in eclipse and now I would like to move the one package into the other for better structure.
Now I tried move but that generates a copy into the same package.
And with refactoring -> move I even can't select the packages
Can anyone help me....
thx all
If you have com.company.foo and com.company.bar, and want to move foo into bar, then just rename com.company.foo to com.company.bar.foo.
If you package happens to have subpackages, tick Rename subpackages to move the subpackages as well.
Use the package explorer view and rename the package. It asks for renaming updating references, renaming sub packages, update textual references in comments and and also non-Java text files. Click on the preview and then ok.
I have found the solution, when you rename a package to the desired destination, check on the box "rename subpackages" and there you go! :) – user1525788 Jul 10 at 9:14
if you have current package:
com.insect.fly
and would like to add subpackage to it, then renaming will solve the purpose e.g.
com.insect.fly.mosquitto
However, eclipse do not should it in nested style. Just do
Package Explorer > click on v button on the pane next to minimize > package presentation > Hierarchical
Hope that SOLVES !!
This is slightly non-intuitive, but the best way to do it is by right clicking on the package you wish to move, clicking on refactor, and then on rename.
Then proceed to enter the fully qualified path which you desire.
For example, if you wish that a package called dog be moved into a package called mammals which itself is in a package called animals you would essentially rename your dog package to animals.mammals.dog
In other words, the package structure
is represented as animals.mammals.dog in the world of Java packages, and a renaming achieves the desired effect.
Please note that you must not try to achieve this by manually moving the folders in Windows explorer. These actions are best done using your IDE.
this is rlly old but try opening in hierarchy mode. in project explorer click the small arrow (pointing down) > package presentation > hierarchical.

Filter Empty Directories in Package Explorer View

Is there a way in eclipse to filter/hide empty directory trees in the package explorer view?
This is different than filtering directories like '.svn' or maven's target, or filtering empty packages. It's more trying to clean up empty directories trees that show up as a result of filter rules.
Context- We have a generic project in our workspace that uses filters to ignore non text based files(mp3s, jpgs, etc). It allows us to quickly edit our files in eclipse. The problem is because of the filters there are a lot of empty folders present. If eclipse can ignore any empty folders due to filters it would make the project cleaner.
Update- I filed a bug report in eclipse's buzilla system for those that wish to have this feature:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=334052
In Eclipse SDK (I use 3.6.2), to hide empty folders in the "Package Explorer":
At the top-right of the Package Explorer view, there's a downward-pointing triangle. If you hover your mouse pointer over it you'll see "View Menu".
Click the "View Menu"
Selected "Filters"
Put a check next to "Empty Packages"
Click OK
now your empty folders don't show any more.
This doesn't seem to be possible and could make for a good bug report.
As bug 157336 (build output contains unnecessary empty directories) comments:
"foo/bar/" is treated as "foo/bar/**".
So, as I understand it foo/bar/** should exclude the content of the directory and foo/bar should additionally exclude the directory itself.
Meaning you might have to add every empty directory yourself to the Exclude list, which is not practical.
Another solution would be to give Mylyn a try and see if its task context switching could hide any folder you don't need in the current task for you.