- Project Browser customization:
- Context menu
- Icons
- Configurable project wide defaults and per-user overrides.
- Open Package Manager
- Paste GitHub URL:
https://github.com/Smidgenomics/unity-pview.git#<tag_or_commit>
From the project root run the following:
git submodule add git@github.com:Smidgenomics/unity-pview.git Packages/com.smidgenomics.unity-pview
In all cases, customizing the Project View involves .json profiles files read from ProjectSettings/pview/ or UserSettings/pview/.
Menu profiles end with .pvm.json and icon profiles with .pvi.json.
Example Files:
Project settings override Unity's default behaviour for all users of the project unless otherwise is configured in User Settings (see below).
User settings allow you to override project defaults, change how they're used, or disable them entirely.
Custom menus are json files that can be read from either ProjectSettings/pview/ or UserSettings/pview/.
*.pvm.json
{
"root":{
"items":[
{
"$type":"cmd",
"cmd":"Assets/Create/Folder"
},
{
"$type":"cmd",
"cmd":"Assets/Create/Material"
},
null,
{
"$type":"cmd",
"label":"Timeline",
"cmd":"*Timeline*"
},
{
"$type":"cmd",
"label":"Visual Scripting",
"cmd":"*Visual Scripting*"
}
]
},
}Included item types:
groupcmdnewfn
Notes:
- Menu paths are hierarchical, so an item's label will always be prefixed by that of its parent group (
Group 1/Group 2/Item 1etc.) nullitems add separators.- If the
$typefield is omitted on items its value will default togroup.
items:MenuItem[]
Contains an array of items.
{
"label":"My Group",
"items":[
{
"$type":"cmd",
"cmd":"Assets/Create/Folder"
},
null,
{
"$type":"cmd",
"cmd":"Assets/Create/Material"
}
]
}cmd:string
Adds options that execute menu commands.
Notes:
- If no
labelvalue is supplied, the command name will be used instead (ex:Assets/Create/Folder->Folder). - For wildcard/regex,
label
Example: Absolute path to command:
{
"$type":"cmd",
"cmd":"Assets/Create/Folder"
}Example: Wildcard:
{
"$type":"cmd",
"cmd":"Assets/Create/*"
}Example: Regex:
{
"$type":"cmd",
"cmd":"^Assets\/Create\/Material|Folder$"
}classType:string|subClasses:bool
Adds menu create options for configured type(s).
classTypecan either be an assembly qualified name or an asset GUID referring to a Scriptable Object's MonoScript asset.- If
subClassesis set totrue, a menu item will be created for each subclass of configured type, usinglabelas a group if supplied. - If
labelis left empty, and specified type has[CreateAssetMenu]defined, its values will be used for the label and default name.
Example: Create instance of specific type
{
"$type":"new",
"label":"Create Gameplay Tag",
"classType":"Game.CoreGameSO,Game.Core"
}Example: Add create option for every subclass
{
"$type":"new",
"label":"Game Data",
"classType":"Game.CoreGameSO,Game.Core",
"subClasses":true
}fn:string
Populates menu with output from static function. The function is referenced using its name and owning type.
{
"$type":"fn",
"label":"Actions",
"fn":"GetCustomActions; MyGame.MyClass,MyGameAssembly"
}The following method signatures are supported:
void fn()(single option)IEnumerable<ValueTuple<string,Action>> fn()(multiple options)
include?:string[]|rules:Dictionary<string,IconConfig>|defaults?:object
Browser icons are configured using a set of rules.
Icon profile (*.pvi.json):
{
"include":[
"ProjectSettings/pview/ourdefault.pvi.json"
],
"rules":{
}
}{
"tex":"<guid_or_name>",
"tint":"#fff",
"uv":"0,0,1,1"
}Example: Set icon for specific asset
"1cbab08d4eadedd4da924f66c02c3dac":{
"tex":"b4508e266a1d41445a0cb18bd9acf8d6"
},Example: Any folder named Textures
"f:*/Textures":{
"tex":"b4508e266a1d41445a0cb18bd9acf8d6"
}Example: Any instance of type with name GameplayTag
"t:GameplayTag":{
"tex":"1dbc26c96219eb34d87eecef7f383d9f",
"tint":"green"
}Example: Blender files
"*.blend":{
"tex":"482859d61bf410148ae3f6668c434350"
}









