How can you find the package name?

I wanted to use the CrossPlatformInput. I know I need a “using” statement. I found this on youtube:

using UnityStandardAssets.CrossPlatformInput;

  • Why is it UnityStandardAssets instead of just StandardAssets?
  • Besides using youtube, how can you find the package name for other packages? Is it just the name as it appears in the project hierarchy?
  • Is this called a package or a namespace?

For the same reason it’s UnityEngine instead of Engine, or UnityEditor instead of Editor. Namespaces exist to make it easier to differentiate code written by different authors. Root namespaces should be as unique as you can make them and adding “Unity” to the beginning of them is the easy way to do that.

No. Namespaces can be completely different from package, folder, and script filenames. Generally if you want to know the namespace you look at the official documentation. If no docs are available the next best thing to do is open the scripts and look at the namespace definitions directly.

Namespace.