Added player character and step in/out of dialogue in scene 101

This commit is contained in:
2026-08-15 15:22:47 +02:00
parent a42f25d5fa
commit 38ba2b0eff
2019 changed files with 181227 additions and 265 deletions
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1db26a9bb354d42cda31cf8b83b7fed4
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,73 @@
#if FBX_EXPORTER
using UnityEditor;
using System.Reflection;
using System.Linq;
using UnityEditor.Formats.Fbx.Exporter;
using UnityEditor.ProBuilder;
using UnityEditor.ProBuilder.Actions;
namespace UnityEngine.ProBuilder.Addons.FBX
{
/// <summary>
/// ProBuilder-specific options when exporting FBX files with the Unity FBX Exporter.
/// </summary>
class FbxOptions
{
/// <summary>
/// Export mesh topology as quads if possible.
/// </summary>
#pragma warning disable 649
public bool quads;
#pragma warning restore 649
}
/// <summary>
/// Provides some additional functionality when the FbxSdk and FbxExporter packages are available in the project.
/// </summary>
[InitializeOnLoad]
static class Fbx
{
static FbxOptions s_FbxOptions = new FbxOptions() {
quads = true
};
static Fbx()
{
TryLoadFbxSupport();
}
static void TryLoadFbxSupport()
{
ModelExporter.RegisterMeshCallback<ProBuilderMesh>(GetMeshForPBComponent, true);
s_FbxOptions.quads = ProBuilderSettings.Get<bool>("Export::m_FbxQuads", SettingsScope.User, true);
}
static bool GetMeshForPBComponent(ModelExporter exporter, ProBuilderMesh pmesh, Autodesk.Fbx.FbxNode node)
{
Mesh mesh = new Mesh();
MeshUtility.Compile(pmesh, mesh, s_FbxOptions.quads ? MeshTopology.Quads : MeshTopology.Triangles);
var pMeshRenderer = pmesh.GetComponent<MeshRenderer>();
var sharedMaterials = pMeshRenderer ? pMeshRenderer.sharedMaterials : null;
exporter.ExportMesh(mesh, node, sharedMaterials);
Object.DestroyImmediate(mesh);
//Need to have ExportOptions accessible to remove this reflection
var exporterType = exporter.GetType().GetMethods(BindingFlags.NonPublic | BindingFlags.Instance)
.First(x => x.Name == "get_ExportOptions").Invoke(exporter, null).GetType();
if(exporterType == typeof(ConvertToPrefabSettingsSerialize))
{
// probuilder can't handle mesh assets that may be externally reloaded, just strip pb stuff for now.
StripProBuilderScripts.DoStrip(pmesh);
}
return true;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 561f179dea8740f41a4a539592427f2b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,27 @@
{
"name": "Unity.ProBuilder.AddOns.Editor",
"rootNamespace": "",
"references": [
"Unity.ProBuilder",
"Unity.ProBuilder.Editor",
"Unity.Formats.Fbx.Editor",
"Autodesk.Fbx"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [
{
"name": "com.unity.formats.fbx",
"expression": "4.0.0",
"define": "FBX_EXPORTER"
}
],
"noEngineReferences": false
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2cfd637d8bffa4f3ebad425f3bdd33a2
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,7 @@
# Enabling FBX Integration
- Install *FBX Exporter* 2.0.1 or newer via Package Manager.
- Add the following dependencies to `Unity.ProBuilder.AddOns.Editor.asmdef` in the "references" array:
- "Autodesk.Fbx"
- "Unity.Formats.Fbx.Editor"
- Open *Project Settings* and add `PROBUILDER_FBX_2_0_1_OR_NEWER` to the *Scripting Define Symbols* field.
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 775c13f8a03a14fcf9021cd73ff0377e
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9e50e13f5457645a89d6c209eac9242a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 274744740648f42a19d3e77602101b06
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,4 @@
using System.Runtime.CompilerServices;
[assembly: InternalsVisibleTo("Unity.ProBuilder.Editor")]
[assembly: InternalsVisibleTo("Unity.ProBuilder.Debug.Editor")]
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a84ca2d947f34a09bd44bc592e22d49c
timeCreated: 1516811154
@@ -0,0 +1,379 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using UnityEditor;
using UObject = UnityEngine.Object;
namespace UnityEngine.ProBuilder.AssetIdRemapUtility
{
[Serializable]
sealed class AssetIdentifierTuple
{
public AssetId source;
public AssetId destination;
public AssetIdentifierTuple()
{
source = null;
destination = null;
}
public AssetIdentifierTuple(AssetId src, AssetId dest)
{
source = src ?? new AssetId();
destination = dest ?? new AssetId();
}
public bool AssetEquals(AssetIdentifierTuple other)
{
return AssetId.IsValid(source) == AssetId.IsValid(other.source) &&
source.AssetEquals(other.source) &&
AssetId.IsValid(destination) == AssetId.IsValid(other.destination) &&
destination.AssetEquals(other.destination);
}
}
[Serializable]
class StringTuple
{
public string key;
public string value;
public StringTuple(string k, string v)
{
key = k;
value = v;
}
}
enum Origin
{
Source,
Destination
}
[Serializable]
class AssetIdRemapObject
{
public List<string> sourceDirectory = new List<string>();
public string destinationDirectory = null;
public List<AssetIdentifierTuple> map = new List<AssetIdentifierTuple>();
public AssetIdentifierTuple this[int i]
{
get { return map[i]; }
set { map[i] = value; }
}
public void Clear(Origin origin)
{
switch (origin)
{
case Origin.Source:
sourceDirectory.Clear();
for (int i = 0, c = map.Count; i < c; i++)
map[i].source.Clear();
break;
case Origin.Destination:
destinationDirectory = "";
for (int i = 0, c = map.Count; i < c; i++)
map[i].destination.Clear();
break;
}
map = map.Where(x => AssetId.IsValid(x.source) || AssetId.IsValid(x.destination)).ToList();
}
public void Delete(IEnumerable<AssetIdentifierTuple> entries)
{
map.RemoveAll(entries.Contains);
}
public void Merge(IEnumerable<AssetIdentifierTuple> entries)
{
var types = entries.SelectMany(x => new[] { x.source.assetType, x.destination.assetType });
if (types.Where(x => !string.IsNullOrEmpty(x)).Distinct().Count() > 1)
{
Debug.LogError("Attempting to map entries of multiple types! This is not allowed.");
return;
}
var arr = entries as AssetIdentifierTuple[] ?? entries.ToArray();
var src = arr.Where(x => AssetId.IsValid(x.source) && !AssetId.IsValid(x.destination)).ToArray();
var dst = arr.Where(x => AssetId.IsValid(x.destination)).ToArray();
if (dst.Length != 1)
{
Debug.LogError("Merging AssetId entries requires only one valid destination entry be selected.");
return;
}
var d = dst.First().destination;
foreach (var s in src)
map.Add(new AssetIdentifierTuple(new AssetId(s.source), new AssetId(d)));
map.RemoveAll(src.Contains);
map.RemoveAll(x => dst.Contains(x) && !AssetId.IsValid(x.source));
}
}
[Serializable]
class AssetId : IEquatable<AssetId>
{
const string k_MonoScriptTypeString = "UnityEditor.MonoScript";
static readonly string[] k_MonoScriptTypeSplit = new string[1] {"::"};
enum AssetType
{
Unknown = 0,
Default = 1,
MonoScript = 2,
// add more as special cases require
}
/// <summary>
/// A path relative to the root asset directory (ex, ProBuilder/About/Hello.cs).
/// Stored per-asset because the path may change between upgrades. A single file name is stored at the tuple
/// level.
/// </summary>
public string localPath
{
get { return m_LocalPath; }
}
public string name
{
get { return m_Name; }
}
/// <summary>
/// Return the backing type of this asset. If the asset is a MonoScript, the associated mono class will be
/// returned. To get the Unity asset type use assetType.
/// </summary>
public string type
{
get { return IsMonoScript() ? m_MonoScriptClass : m_Type; }
}
public string assetType
{
get { return IsMonoScript() ? k_MonoScriptTypeString : m_Type; }
}
/// <summary>
/// File Ids associated with this asset.
/// </summary>
public string fileId
{
get { return m_FileId; }
}
/// <summary>
/// Asset GUID.
/// </summary>
public string guid
{
get { return m_Guid; }
}
[SerializeField]
string m_Guid;
[SerializeField]
string m_FileId;
[SerializeField]
string m_LocalPath;
[SerializeField]
string m_Name;
[SerializeField]
string m_Type;
// the remaining properties are only relevant to monoscript files
AssetType m_InternalType = AssetType.Unknown;
string m_MonoScriptClass = null;
#pragma warning disable 414
bool m_IsEditorScript = false;
#pragma warning restore 414
public AssetId()
{
Clear();
}
public AssetId(AssetId other)
{
m_Guid = other.m_Guid;
m_FileId = other.m_FileId;
m_LocalPath = other.m_LocalPath;
m_Name = other.m_Name;
m_Type = other.m_Type;
}
public AssetId(UObject obj, string file, string guid, string localPath = null)
{
if (obj == null)
throw new SystemException("Cannot initialize an AssetIdentifier with a null object");
if (string.IsNullOrEmpty(guid))
throw new SystemException("Cannot initialize an AssetIdentifier without a GUID");
if (string.IsNullOrEmpty(file))
throw new SystemException("Cannot initialize an AssetIdentifier without a FileId");
m_FileId = file;
m_Guid = guid;
m_Name = obj.name;
m_LocalPath = localPath;
m_Type = GetUObjectTypeString(obj);
}
static string GetUObjectTypeString(UObject obj)
{
MonoScript ms = obj as MonoScript;
if (ms != null)
return string.Format("{0}{1}{2}", obj.GetType().ToString(), k_MonoScriptTypeSplit[0], ms.GetClass());
return obj.GetType().ToString();
}
public bool Equals(AssetId other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return string.Equals(m_Guid, other.m_Guid) &&
string.Equals(m_FileId, other.m_FileId) &&
string.Equals(m_LocalPath, other.m_LocalPath);
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
var id = obj as AssetId;
if (id != null) return Equals(id);
return false;
}
public override int GetHashCode()
{
int hash = 0;
unchecked
{
hash = (hash * 7) + (string.IsNullOrEmpty(m_Guid) ? 0 : m_Guid.GetHashCode());
hash = (hash * 7) + (string.IsNullOrEmpty(m_FileId) ? 0 : m_FileId.GetHashCode());
hash = (hash * 7) + (string.IsNullOrEmpty(m_LocalPath) ? 0 : m_LocalPath.GetHashCode());
}
return hash;
}
public void Clear()
{
m_Guid = "";
m_FileId = "";
m_LocalPath = "";
m_Name = "";
m_Type = "";
m_InternalType = AssetType.Unknown;
m_MonoScriptClass = null;
m_IsEditorScript = false;
}
public void SetPathRelativeTo(string dir)
{
m_LocalPath = m_LocalPath.Replace(dir, "");
}
public static bool IsValid(AssetId id)
{
return !string.IsNullOrEmpty(id == null ? null : id.m_Guid);
}
public bool IsMonoScript()
{
if (m_InternalType == AssetType.Unknown)
{
if (m_Type.StartsWith(k_MonoScriptTypeString))
{
m_InternalType = AssetType.MonoScript;
try
{
m_MonoScriptClass = m_Type.Split(k_MonoScriptTypeSplit, StringSplitOptions.RemoveEmptyEntries)[1];
if (m_LocalPath.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase))
m_IsEditorScript = m_LocalPath.StartsWith("Editor/") || m_LocalPath.Contains("/Editor/") || PackageImporter.IsEditorPluginEnabled(guid);
else
m_IsEditorScript = m_LocalPath.StartsWith("Editor/") || m_LocalPath.Contains("/Editor/");
}
catch
{
m_MonoScriptClass = "null";
// pb_Log.Debug("Failed parsing type from monoscript \"" + m_Name + "\" (" + m_Type + ")");
}
}
else
{
m_InternalType = AssetType.Default;
}
}
return m_InternalType == AssetType.MonoScript;
}
bool GetNamespaceAndType(string classType, out string namespaceString, out string typeString)
{
namespaceString = null;
typeString = null;
if (string.IsNullOrEmpty(classType))
return false;
int last = classType.LastIndexOf('.');
if (last < 0)
{
typeString = classType;
return true;
}
namespaceString = classType.Substring(0, last);
typeString = classType.Substring(last + 1, (classType.Length - last) - 1);
return true;
}
public bool AssetEquals(AssetId other)
{
if (!assetType.Equals(other.assetType))
return false;
return localPath.Equals(other.localPath);
}
/// <summary>
/// Does the object this id reference exist in the project?
/// </summary>
/// <returns></returns>
public bool ExistsInProject()
{
string assetPath = AssetDatabase.GUIDToAssetPath(m_Guid);
if (string.IsNullOrEmpty(assetPath))
return false;
var assetObj = AssetDatabase.LoadAssetAtPath<UObject>(assetPath);
if (assetObj == null)
return false;
return m_Type.Equals(GetUObjectTypeString(assetObj));
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4ce1c67454d65d14eb3eae2f44b0ffa7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,487 @@
#if PROBUILDER_DEBUG
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor;
using UObject = UnityEngine.Object;
using UnityEditor.IMGUI.Controls;
#if UNITY_6000_3_OR_NEWER
using BaseTreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#else
using BaseTreeViewState = UnityEditor.IMGUI.Controls.TreeViewState;
#endif
namespace UnityEngine.ProBuilder.AssetIdRemapUtility
{
/// <summary>
/// Utility class for creating GUID remap files.
/// </summary>
sealed class AssetIdRemapBuilderEditor : EditorWindow
{
const string k_RemapFilePath = "AssetIdRemap.json";
const string k_NamespaceRemapFilePath = "NamespaceRemap.json";
static string remapFilePath
{
get { return "Assets/" + k_RemapFilePath; }
}
static string namespaceRemapFilePath
{
get { return "Assets/" + k_NamespaceRemapFilePath; }
}
static readonly string[] k_DirectoryExcludeFilter = new string[]
{
"ProBuilder/About",
"ProBuilder/AssetIdRemapUtility",
"ProBuilder/API Examples",
"ProBuilder/Data",
"ProBuilder/Icons",
"ProBuilder/Upgrade",
};
static GUIContent m_SourceGuiContent = new GUIContent("Source", "The old GUID and FileId.");
static GUIContent m_DestinationGuiContent = new GUIContent("Destination", "The new GUID and FileId.");
[SerializeField] TextAsset m_RemapTextAsset = null;
[SerializeField] TextAsset m_NamespaceRemapTextAsset = null;
[SerializeField] string m_SourceDirectory;
[SerializeField] string m_DestinationDirectory;
[SerializeField] BaseTreeViewState m_TreeViewState;
[SerializeField] MultiColumnHeaderState m_MultiColumnHeaderState;
[SerializeField] bool m_DetailsExpanded;
MultiColumnHeader m_MultiColumnHeader;
AssetIdRemapBuilderTreeView m_TreeView;
SearchField m_SearchField;
[MenuItem("Tools/GUID Remap Editor")]
static void MenuOpenGuidEditor()
{
var win = GetWindow<AssetIdRemapBuilderEditor>(true, "GUID Remap Editor", true);
win.m_DetailsExpanded = true;
}
static class Styles
{
static GUIStyle m_Container = null;
public static GUIStyle container
{
get
{
if (m_Container == null)
{
m_Container = new GUIStyle(EditorStyles.helpBox);
m_Container.padding = new RectOffset(4, 4, 4, 4);
}
return m_Container;
}
}
}
void OnEnable()
{
// Check whether there is already a serialized view state (state
// that survived assembly reloading)
if (m_TreeViewState == null)
m_TreeViewState = new BaseTreeViewState();
if (m_MultiColumnHeaderState == null)
m_MultiColumnHeaderState = new MultiColumnHeaderState(new MultiColumnHeaderState.Column[]
{
new MultiColumnHeaderState.Column() {
headerContent = m_SourceGuiContent,
autoResize = true
},
new MultiColumnHeaderState.Column() {
headerContent = m_DestinationGuiContent,
autoResize = true
},
});
m_MultiColumnHeader = new MultiColumnHeader(m_MultiColumnHeaderState);
m_MultiColumnHeader.ResizeToFit();
m_TreeView = new AssetIdRemapBuilderTreeView(m_TreeViewState, m_MultiColumnHeader);
m_TreeView.remapObject = GetGuidRemapObject();
m_TreeView.Reload();
m_SearchField = new SearchField();
}
void OnDestroy()
{
if (m_TreeView.isDirty)
{
if (EditorUtility.DisplayDialog("Unsaved Changes", "There are unsaved changes to the remap file. Save these changes?", "Save", "Discard"))
Save();
}
}
string GetRemapFilePath()
{
if (m_RemapTextAsset != null)
return AssetDatabase.GetAssetPath(m_RemapTextAsset);
return remapFilePath;
}
void Save()
{
File.WriteAllText(GetRemapFilePath(), JsonUtility.ToJson(m_TreeView.remapObject, true));
AssetDatabase.ImportAsset(GetRemapFilePath());
EditorGUIUtility.PingObject(AssetDatabase.LoadAssetAtPath<TextAsset>(GetRemapFilePath()));
m_TreeView.isDirty = false;
}
void OnGUI()
{
GUILayout.BeginHorizontal(EditorStyles.toolbar);
if (GUILayout.Button(m_DetailsExpanded ? "Hide" : "Show", EditorStyles.toolbarButton))
m_DetailsExpanded = !m_DetailsExpanded;
GUILayout.FlexibleSpace();
GUI.enabled = m_TreeView.isDirty;
if (GUILayout.Button("Revert", EditorStyles.toolbarButton))
{
m_TreeView.remapObject = null;
m_TreeView.remapObject = GetGuidRemapObject();
m_TreeView.Reload();
m_TreeView.isDirty = false;
}
if (GUILayout.Button("Save", EditorStyles.toolbarButton))
Save();
GUI.enabled = true;
GUILayout.EndHorizontal();
if (m_DetailsExpanded)
{
EditorGUI.BeginChangeCheck();
m_RemapTextAsset = (TextAsset)EditorGUILayout.ObjectField("Remap", m_RemapTextAsset, typeof(TextAsset), false);
m_NamespaceRemapTextAsset = (TextAsset)EditorGUILayout.ObjectField("Namespace", m_NamespaceRemapTextAsset, typeof(TextAsset), false);
if (EditorGUI.EndChangeCheck())
{
m_TreeView.remapObject = null;
m_TreeView.remapObject = GetGuidRemapObject();
m_TreeView.Reload();
Repaint();
}
EditorGUILayout.BeginVertical(Styles.container);
GUILayout.Label("Package Directories", EditorStyles.boldLabel);
EditorGUILayout.BeginVertical(Styles.container);
m_SourceDirectory = DoDirectoryField("Source", m_SourceDirectory);
EditorGUI.BeginChangeCheck();
if (GUILayout.Button("Collect Source (Old) Asset Identifiers"))
GetRemapSource(m_SourceDirectory);
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(Styles.container);
m_DestinationDirectory = DoDirectoryField("Destination", m_DestinationDirectory);
if (GUILayout.Button("Collect Destination (New) Asset Identifiers"))
GetRemapDestination(m_DestinationDirectory);
if (EditorGUI.EndChangeCheck())
m_TreeView.Reload();
EditorGUILayout.EndVertical();
EditorGUILayout.EndVertical();
}
GUILayout.BeginHorizontal();
GUILayout.Label("Asset Id Mapping", EditorStyles.boldLabel);
GUILayout.FlexibleSpace();
if (GUILayout.Button("..."))
{
var menu = new GenericMenu();
menu.AddItem(new GUIContent("Clear Source", ""), false, () =>
{
GetGuidRemapObject().Clear(Origin.Source);
m_TreeView.Reload();
m_TreeView.isDirty = true;
});
menu.AddItem(new GUIContent("Clear Destination", ""), false, () =>
{
GetGuidRemapObject().Clear(Origin.Destination);
m_TreeView.Reload();
m_TreeView.isDirty = true;
});
menu.ShowAsContext();
}
GUILayout.EndHorizontal();
Rect last = GUILayoutUtility.GetLastRect();
m_TreeView.searchString = m_SearchField.OnGUI(new Rect(last.x, last.y + last.height + 4, position.width - last.x * 2f, 20f),
m_TreeView.searchString);
Vector2 treeStart = new Vector2(last.x, last.y + last.height + 4 + 20f + 4f);
m_TreeView.SetRowHeight();
m_TreeView.OnGUI(new Rect(treeStart.x, treeStart.y, position.width - treeStart.x * 2, position.height - treeStart.y));
}
static string DoDirectoryField(string title, string value)
{
GUILayout.BeginHorizontal();
EditorGUI.BeginChangeCheck();
value = EditorGUILayout.TextField(title, value);
if (GUILayout.Button("Select", GUILayout.MaxWidth(60)))
value = GetSelectedDirectory();
bool didChange = EditorGUI.EndChangeCheck();
bool doOpenFolderPanel = GUILayout.Button("...", GUILayout.MaxWidth(32));
GUILayout.EndHorizontal();
if (doOpenFolderPanel)
{
value = EditorUtility.OpenFolderPanel(title, value, "");
didChange = true;
}
return didChange ? value = value.Replace("\\", "/").Replace(Application.dataPath, "Assets") : value;
}
void GetRemapSource(string directory)
{
if (string.IsNullOrEmpty(directory) || !Directory.Exists(directory))
{
Debug.LogWarning("No source directory selected.");
return;
}
var remapObject = GetGuidRemapObject();
string localDirectory = directory.Replace("\\", "/").Replace(Application.dataPath, "Assets") + "/";
if (!remapObject.sourceDirectory.Contains(localDirectory))
remapObject.sourceDirectory.Add(localDirectory);
List<AssetIdentifierTuple> map = remapObject.map;
foreach (var id in GetAssetIdentifiersInDirectory(localDirectory, k_DirectoryExcludeFilter))
{
id.SetPathRelativeTo(localDirectory);
if (map.Any(x => x.source != null && x.source.Equals(id)))
continue;
// the only time where a destination can exist with a null source is when a single destination is in the
// map, so it's okay to grab the first and not bother searching for more dangling destination entries
AssetIdentifierTuple matchingDestination =
map.FirstOrDefault(x =>
{
return x.destination != null &&
x.destination.AssetEquals(id);
});
if (matchingDestination != null)
{
if (AssetId.IsValid(matchingDestination.source))
map.Add(new AssetIdentifierTuple(id, matchingDestination.destination));
else
matchingDestination.source = id;
}
else
{
map.Add(new AssetIdentifierTuple(id, null));
}
}
m_TreeView.isDirty = true;
}
void GetRemapDestination(string directory)
{
if (string.IsNullOrEmpty(directory) || !Directory.Exists(directory))
{
Debug.LogWarning("No destination directory selected.");
return;
}
var remapObject = GetGuidRemapObject();
if (!string.IsNullOrEmpty(remapObject.destinationDirectory))
{
if (!EditorUtility.DisplayDialog("Destination Directory Already Mapped",
"The destination directory has already been mapped. Continuing will overwrite the existing data. Are you sure you wish to continue?",
"Continue", "Cancel"))
return;
}
string localDirectory = directory.Replace("\\", "/").Replace(Application.dataPath, "Assets") + "/";
remapObject.destinationDirectory = localDirectory;
List<AssetIdentifierTuple> map = remapObject.map;
foreach (var id in GetAssetIdentifiersInDirectory(localDirectory, k_DirectoryExcludeFilter))
{
if (map.Any(x => x.destination.Equals(id)))
continue;
id.SetPathRelativeTo(localDirectory);
IEnumerable<AssetIdentifierTuple> matchingSources =
map.Where(x => x.source != null && x.source.AssetEquals(id));
if (matchingSources.Any())
{
foreach (var tup in matchingSources)
tup.destination = id;
}
else
{
map.Add(new AssetIdentifierTuple(null, id));
}
}
m_TreeView.isDirty = true;
}
/// <summary>
/// Collect asset identifier information from all files in a directory.
/// </summary>
/// <param name="directory"></param>
/// <param name="directoryIgnoreFilter"></param>
static List<AssetId> GetAssetIdentifiersInDirectory(string directory, string[] directoryIgnoreFilter)
{
List<AssetId> ids = new List<AssetId>();
string unixPath = directory.Replace("\\", "/");
string packageAbsolutePath = null;
string packageRelativePath = null;
if (directory.StartsWith("Packages/"))
{
// +1 because we want the trailing "/" to be with the packageRelativePath
var en = unixPath.IndexOf("/", "Packages/".Length, StringComparison.InvariantCulture) + 1;
packageRelativePath = unixPath.Substring(0, en);
var targetPathRelative = unixPath.Substring(en, unixPath.Length - en);
packageAbsolutePath = Path.GetFullPath(unixPath).Replace("\\", "/");
if (!string.IsNullOrEmpty(targetPathRelative))
packageAbsolutePath = packageAbsolutePath.Replace(targetPathRelative, "");
}
if (directoryIgnoreFilter != null && directoryIgnoreFilter.Any(x => unixPath.Contains(x)))
return ids;
foreach (string file in Directory.GetFiles(Path.GetFullPath(directory), "*", SearchOption.TopDirectoryOnly))
{
if (file.EndsWith(".meta") || Path.GetFileName(file).StartsWith("."))
continue;
string localPath = file.Replace("\\", "/").Replace(Application.dataPath, "Assets");
if (!string.IsNullOrEmpty(packageAbsolutePath))
localPath = localPath.Replace(packageAbsolutePath, packageRelativePath);
ids.AddRange(GetAssetIdentifiers(localPath));
}
foreach (string dir in Directory.GetDirectories(directory, "*", SearchOption.TopDirectoryOnly))
{
if (Path.GetDirectoryName(dir).StartsWith("."))
continue;
string path = !string.IsNullOrEmpty(packageAbsolutePath)
? dir.Replace("\\", "/").Replace(packageAbsolutePath, packageRelativePath)
: dir;
ids.AddRange(GetAssetIdentifiersInDirectory(path, directoryIgnoreFilter));
}
return ids;
}
static List<AssetId> GetAssetIdentifiers(string assetPath)
{
List<AssetId> ids = new List<AssetId>();
if (assetPath.EndsWith(".unity"))
return ids;
foreach (UnityEngine.Object o in AssetDatabase.LoadAllAssetsAtPath(assetPath))
{
string g;
long file;
if (o != null && AssetDatabase.TryGetGUIDAndLocalFileIdentifier(o, out g, out file))
ids.Add(new AssetId(o, file.ToString(), g.ToString(), assetPath));
}
return ids;
}
/// <summary>
/// Load a remap json file from a relative path (Assets/MyRemapFile.json).
/// </summary>
/// <returns>A GuidRemapObject from the path, or if not found, a new GuidRemapObject</returns>
AssetIdRemapObject GetGuidRemapObject()
{
var remapObject = m_TreeView.remapObject;
if (remapObject != null)
return remapObject;
if (m_RemapTextAsset == null)
m_RemapTextAsset = AssetDatabase.LoadAssetAtPath<TextAsset>(remapFilePath);
remapObject = new AssetIdRemapObject();
if (m_RemapTextAsset != null)
JsonUtility.FromJsonOverwrite(m_RemapTextAsset.text, remapObject);
return remapObject;
}
static string GetSelectedDirectory()
{
UObject o = Selection.activeObject;
if (o != null)
{
#if UNITY_6000_4_OR_NEWER
string path = AssetDatabase.GetAssetPath(o.GetEntityId());
#else
#pragma warning disable 0618
string path = AssetDatabase.GetAssetPath(o.GetInstanceID());
#pragma warning restore 0618
#endif
if (!string.IsNullOrEmpty(path))
{
if (Directory.Exists(path))
return Path.GetFullPath(path);
string res = Path.GetDirectoryName(path);
if (!string.IsNullOrEmpty(res) && System.IO.Directory.Exists(res))
return Path.GetFullPath(res);
}
}
return Path.GetFullPath("Assets");
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 20257f54bb007a547b7cb64d633a1664
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,228 @@
#if PROBUILDER_DEBUG
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
#if UNITY_6000_3_OR_NEWER
using BaseTreeView = UnityEditor.IMGUI.Controls.TreeView<int>;
using BaseTreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
using BaseTreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#else
using BaseTreeView = UnityEditor.IMGUI.Controls.TreeView;
using BaseTreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
using BaseTreeViewState = UnityEditor.IMGUI.Controls.TreeViewState;
#endif
namespace UnityEngine.ProBuilder.AssetIdRemapUtility
{
sealed class AssetIdRemapBuilderTreeView : BaseTreeView
{
AssetIdRemapObject m_RemapObject = null;
const float k_RowHeight = 20f;
const float k_RowHeightSearching = 76f;
public bool isDirty = false;
public AssetIdRemapObject remapObject
{
get { return m_RemapObject; }
set { m_RemapObject = value; }
}
public AssetIdRemapBuilderTreeView(BaseTreeViewState state, MultiColumnHeader header)
: base(state, header)
{
rowHeight = 20f;
showAlternatingRowBackgrounds = true;
showBorder = true;
extraSpaceBeforeIconAndLabel = 18f;
}
protected override BaseTreeViewItem BuildRoot()
{
StringTupleTreeElement root = new StringTupleTreeElement(0, -1, -1, "Root", "", "");
var all = new List<BaseTreeViewItem>();
int index = 1;
for (int i = 0, c = remapObject.map.Count; i < c; i++)
{
all.Add(new StringTupleTreeElement(index++, 0, i, "Remap Entry", remapObject[i].source.name, remapObject[i].destination.name));
all.Add(new StringTupleTreeElement(index++, 1, i, "Local Path", remapObject[i].source.localPath, remapObject[i].destination.localPath));
all.Add(new StringTupleTreeElement(index++, 1, i, "GUID", remapObject[i].source.guid, remapObject[i].destination.guid));
all.Add(new StringTupleTreeElement(index++, 1, i, "File ID", remapObject[i].source.fileId, remapObject[i].destination.fileId));
all.Add(new StringTupleTreeElement(index++, 1, i, "Type", remapObject[i].source.type, remapObject[i].destination.type));
}
SetupParentsAndChildrenFromDepths(root, all);
return root;
}
public void SetRowHeight()
{
rowHeight = hasSearch ? k_RowHeightSearching : k_RowHeight;
}
protected override void RowGUI(RowGUIArgs args)
{
StringTupleTreeElement item = args.item as StringTupleTreeElement;
for (int i = 0; i < args.GetNumVisibleColumns(); ++i)
{
CellGUI(args.GetCellRect(i), item, i, ref args);
}
}
GUIContent m_CellContents = new GUIContent();
void CellGUI(Rect rect, StringTupleTreeElement item, int visibleColumn, ref RowGUIArgs args)
{
if (hasSearch)
{
AssetId id = visibleColumn == 0 ? m_RemapObject[item.index].source : m_RemapObject[item.index].destination;
m_CellContents.text = "<b>Name: </b>" + id.name +
"\n<b>Path: </b>" + id.localPath +
"\n<b>Guid: </b>" + id.guid +
"\n<b>FileId: </b>" + id.fileId +
"\n<b>Type: </b>" + id.type + (string.IsNullOrEmpty(id.assetType) ? "" : " (" + id.assetType + ")");
}
else
{
m_CellContents.text = item.GetLabel(visibleColumn);
}
rect.x += foldoutWidth + 4;
rect.width -= (foldoutWidth + 4);
if (hasSearch)
{
float textHeight = GUI.skin.label.CalcHeight(m_CellContents, rect.width);
rect.y += (rect.height - textHeight) * .5f;
rect.height = textHeight;
}
else
{
CenterRectUsingSingleLineHeight(ref rect);
}
GUI.skin.label.richText = true;
GUI.Label(rect, m_CellContents);
}
protected override bool DoesItemMatchSearch(BaseTreeViewItem element, string search)
{
StringTupleTreeElement tup = element as StringTupleTreeElement;
if (tup == null || tup.depth > 0)
return false;
var o = m_RemapObject[tup.index];
try
{
var patterns = search.Split(new[] { "\\&" }, StringSplitOptions.None).Select(x => new Regex(x));
foreach (var pattern in patterns)
{
if (!(pattern.IsMatch(o.source.localPath) ||
pattern.IsMatch(o.source.guid) ||
pattern.IsMatch(o.source.fileId) ||
pattern.IsMatch(o.source.type) ||
pattern.IsMatch(o.destination.localPath) ||
pattern.IsMatch(o.destination.guid) ||
pattern.IsMatch(o.destination.fileId) ||
pattern.IsMatch(o.destination.type)))
return false;
}
return true;
}
catch
{
return o.source.localPath.Contains(search) ||
o.source.guid.Contains(search) ||
o.source.fileId.Contains(search) ||
o.source.type.Contains(search) ||
o.destination.localPath.Contains(search) ||
o.destination.guid.Contains(search) ||
o.destination.fileId.Contains(search) ||
o.destination.type.Contains(search);
}
}
protected override void ContextClicked()
{
GenericMenu menu = new GenericMenu();
menu.AddItem(new GUIContent("Combine", ""), false, () =>
{
m_RemapObject.Merge(GetAssetIdSelection());
isDirty = true;
Reload();
SetSelection(new int[] {});
});
menu.ShowAsContext();
}
IEnumerable<AssetIdentifierTuple> GetAssetIdSelection()
{
return GetSelection().Select(x => m_RemapObject[((StringTupleTreeElement)FindItem(x, rootItem)).index]);
}
protected override void CommandEventHandling()
{
var evt = Event.current;
var selected = GetSelection();
if (selected.Count > 0)
{
if (evt.type == EventType.ValidateCommand)
{
if (evt.commandName.Equals("SoftDelete"))
evt.Use();
}
else if (evt.type == EventType.ExecuteCommand)
{
if (evt.commandName.Equals("SoftDelete")
&& EditorUtility.DisplayDialog("Delete", "Delete Selected Entries?", "Delete", "Cancel"))
{
m_RemapObject.Delete(GetAssetIdSelection());
evt.Use();
Reload();
isDirty = true;
SetSelection(new int[] {});
}
}
}
base.CommandEventHandling();
}
}
class StringTupleTreeElement : BaseTreeViewItem
{
public string item1;
public string item2;
public int index;
public StringTupleTreeElement(int id, int depth, int sourceIndex, string displayName, string key, string value) : base(id, depth, displayName)
{
item1 = key;
item2 = value;
index = sourceIndex;
}
public string GetLabel(int column)
{
return column < 1 ? item1 : item2;
}
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: daa26ef7aa9c82a47a06ddb6eefc0674
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,727 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
#if UNITY_6000_3_OR_NEWER
using BaseTreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
using BaseTreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
#else
using BaseTreeViewState = UnityEditor.IMGUI.Controls.TreeViewState;
using BaseTreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
#endif
namespace UnityEngine.ProBuilder.AssetIdRemapUtility
{
sealed class AssetIdRemapEditor : EditorWindow
{
const string k_ProBuilder2DllName = "ProBuilderCore-Unity5.dll";
const string k_ProBuilder3DllName = "ProBuilderCore.dll";
const string k_ConversionLogPath = "Temp/ProBuilderConversionLog.txt";
static readonly string[] k_RemapFilePaths = new string[]
{
"Packages/com.unity.probuilder/Content/Upgrade/AssetIdRemap-4_0_0.json"
};
static readonly string[] k_AssetExtensionsToRemap = new string[]
{
"*.meta",
"*.unity",
"*.asset",
"*.anim",
"*.animset",
"*.blendtree",
"*.buildreport",
"*.colors",
"*.controller",
"*.cubemap",
"*.curves",
"*.curvesNormalized",
"*.flare",
"*.fontsettings",
"*.giparams",
"*.gradients",
"*.guiskin",
"*.ht",
"*.mask",
"*.mat",
"*.mesh",
"*.mixer",
"*.overrideController",
"*.particleCurves",
"*.particleCurvesSigned",
"*.particleDoubleCurves",
"*.particleDoubleCurvesSigned",
"*.physicMaterial",
"*.physicsMaterial2D",
"*.playable",
"*.prefab",
"*.preset",
"*.renderTexture",
"*.shadervariants",
"*.spriteatlas",
"*.state",
"*.statemachine",
"*.texture2D",
"*.transition",
"*.webCamTexture",
};
static readonly string[] k_AssetStoreDirectorySuggestedDeleteIgnoreFilter = new string[]
{
"(^|(?<=/))Data(/|)$",
"(^|(?<=/))ProBuilderMeshCache(/|)$",
".meta$",
"^\\."
};
static readonly string[] k_AssetStoreSuggestedFileDeleteIgnoreFilter = new string[]
{
".meta$",
".asset$",
"^\\."
};
static readonly string[] k_AssetStoreMustDelete = new string[]
{
"pb_Object.cs",
"pb_Entity.cs",
"ProBuilder/Classes",
"ProBuilder/Editor",
"ProBuilderCore-Unity5.dll",
"ProBuilderMeshOps-Unity5.dll",
"ProBuilderEditor-Unity5.dll"
};
// @todo show a warning when any code is not getting deleted
static readonly string[] k_AssetStoreShouldDelete = new string[]
{
"ProBuilder/API Examples",
"API Examples/Editor",
"ProBuilder/About",
"ProBuilder/Shader",
};
[Flags]
enum ConversionReadyState
{
Ready = 0,
NoActionRequired = 1 << 0,
SerializationError = 1 << 1,
AssetStoreDeleteError = 1 << 2,
AssetStoreDeleteWarning = 1 << 3,
AssetStoreInstallFound = 1 << 4,
DeprecatedAssetIdsFound = 1 << 5,
MissingRemapFile = 1 << 6,
ConversionRan = 1 << 7
};
TextAsset m_RemapFile = null;
[SerializeField]
string m_DeprecatedProBuilderDirectory;
[SerializeField]
bool m_DeprecatedProBuilderFound;
[SerializeField]
ConversionReadyState m_ConversionReadyState = ConversionReadyState.Ready;
string m_ConversionLog;
AssetTreeView m_AssetsToDeleteTreeView;
MultiColumnHeader m_MultiColumnHeader;
Rect m_AssetTreeRect = new Rect(0, 0, 0, 0);
[SerializeField]
BaseTreeViewState m_TreeViewState = null;
[SerializeField]
MultiColumnHeaderState m_MultiColumnHeaderState = null;
GUIContent m_AssetTreeSettingsContent = null;
Vector2 m_ConversionLogScroll = Vector2.zero;
static class Styles
{
public static GUIStyle settingsIcon { get { return m_SettingsIcon; } }
public static GUIStyle convertButton { get { return m_ConvertButton; } }
static bool m_Init = false;
static GUIStyle m_SettingsIcon;
static GUIStyle m_ConvertButton;
public static void Init()
{
if (!m_Init)
m_Init = true;
else
return;
m_SettingsIcon = GUI.skin.GetStyle("IconButton");
m_ConvertButton = new GUIStyle(GUI.skin.GetStyle("AC Button"));
m_ConvertButton.margin.bottom += 4;
}
}
internal static void OpenConversionEditor()
{
GetWindow<AssetIdRemapEditor>(true, "ProBuilder Update Utility", true);
}
void OnEnable()
{
m_AssetTreeSettingsContent = EditorGUIUtility.IconContent("_Popup");
for (int i = 0, c = k_RemapFilePaths.Length; m_RemapFile == null && i < c; i++)
m_RemapFile = AssetDatabase.LoadAssetAtPath<TextAsset>(k_RemapFilePaths[i]);
if (m_RemapFile == null)
{
Debug.LogWarning("Could not find a valid asset id remap file!");
}
if (m_TreeViewState == null)
m_TreeViewState = new BaseTreeViewState();
if (m_MultiColumnHeaderState == null)
m_MultiColumnHeaderState = new MultiColumnHeaderState(new MultiColumnHeaderState.Column[]
{
new MultiColumnHeaderState.Column()
{
headerContent = new GUIContent("Obsolete Files to Delete")
}
});
m_MultiColumnHeader = new MultiColumnHeader(m_MultiColumnHeaderState) { height = 0 };
m_AssetsToDeleteTreeView = new AssetTreeView(m_TreeViewState, m_MultiColumnHeader);
ResetAssetsToDelete();
try
{
if (File.Exists(k_ConversionLogPath))
m_ConversionLog = File.ReadAllText(k_ConversionLogPath);
else
m_ConversionLog = null;
}
catch
{
m_ConversionLog = null;
}
// if the project just contains deprecated guids, and is already in text serialization mode, we can skip the dialog
// and just run the conversion immediately.
if (m_ConversionReadyState == (ConversionReadyState.Ready | ConversionReadyState.DeprecatedAssetIdsFound))
DoConversion();
}
void OnGUI()
{
Styles.Init();
if (m_ConversionReadyState == ConversionReadyState.NoActionRequired ||
m_ConversionReadyState == ConversionReadyState.ConversionRan)
{
if (!string.IsNullOrEmpty(m_ConversionLog))
{
m_ConversionLogScroll = EditorGUILayout.BeginScrollView(m_ConversionLogScroll);
GUILayout.Label(m_ConversionLog, EditorStyles.wordWrappedLabel);
EditorGUILayout.EndScrollView();
}
else
{
GUI.Label(new Rect(0, 0, position.width, position.height), "ProBuilder is up to date!",
EditorStyles.centeredGreyMiniLabel);
if (Event.current.type == EventType.ContextClick)
{
var menu = new GenericMenu();
menu.AddItem(new GUIContent("Find and replace deprecated Asset IDs"), false, () =>
{
var log = new StringBuilder();
RemapAssetIds(log);
Debug.Log(log);
});
menu.ShowAsContext();
}
}
return;
}
else if ((m_ConversionReadyState & ConversionReadyState.AssetStoreInstallFound) > 0)
{
GUILayout.Label("Obsolete Files to Delete", EditorStyles.boldLabel);
m_AssetTreeRect = GUILayoutUtility.GetRect(position.width, 128, GUILayout.ExpandHeight(true));
EditorGUI.BeginChangeCheck();
DrawTreeSettings();
m_AssetsToDeleteTreeView.OnGUI(m_AssetTreeRect);
if (EditorGUI.EndChangeCheck())
m_ConversionReadyState = GetReadyState();
}
else if ((m_ConversionReadyState & ConversionReadyState.DeprecatedAssetIdsFound) > 0)
{
var deprecatedIdsRect = GUILayoutUtility.GetRect(position.width, 32, GUILayout.ExpandHeight(true));
GUI.Label(deprecatedIdsRect, "References to old ProBuilder install found.\n\nProject is ready for conversion.",
EditorStyles.centeredGreyMiniLabel);
}
if ((m_ConversionReadyState & ConversionReadyState.SerializationError) > 0)
{
EditorGUILayout.HelpBox(
"Cannot update project with binary or mixed serialization.\n\nPlease swith to ForceText serialization to proceed (you may switch back to ForceBinary or Mixed after the conversion process).",
MessageType.Error);
SerializationMode serializationMode = EditorSettings.serializationMode;
EditorGUI.BeginChangeCheck();
serializationMode = (SerializationMode)EditorGUILayout.EnumPopup("Serialization Mode", serializationMode);
if (EditorGUI.EndChangeCheck())
{
EditorSettings.serializationMode = serializationMode;
m_ConversionReadyState = GetReadyState();
}
}
if ((m_ConversionReadyState & ConversionReadyState.AssetStoreDeleteError) > 0)
EditorGUILayout.HelpBox(
"Cannot update project without removing ProBuilder/Classes and ProBuilder/Editor directories.", MessageType.Error);
if ((m_ConversionReadyState & ConversionReadyState.AssetStoreDeleteWarning) > 0)
EditorGUILayout.HelpBox(
"Some old ProBuilder files are not marked for deletion. This may cause errors after the conversion process is complete.\n\nTo clear this error use the settings icon to reset the Assets To Delete tree.",
MessageType.Warning);
GUI.enabled =
(m_ConversionReadyState & (ConversionReadyState.AssetStoreDeleteError | ConversionReadyState.SerializationError)) ==
ConversionReadyState.Ready;
GUILayout.BeginHorizontal();
GUILayout.FlexibleSpace();
if (GUILayout.Button("Convert to ProBuilder 4", Styles.convertButton))
{
DoConversion();
GUIUtility.ExitGUI();
}
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
GUILayout.Space(16);
GUI.enabled = true;
}
void DoConversion()
{
var log = new StringBuilder();
try
{
// Set serialization mode to mixed then back to force-text to reserialize any assets in binary form
// that may have somehow persisted (version control makes a state where "Force Text" is enabled with
// some existing binary assets persisting possible). this happened during testing.
// mixed doesn't refresh anything, but setting to ForceText re-iterates all assets and double-checks
// that they are in the correct format.
EditorSettings.serializationMode = SerializationMode.Mixed;
EditorSettings.serializationMode = SerializationMode.ForceText;
EditorApplication.LockReloadAssemblies();
log.AppendLine("ProBuilder 4 Conversion Log");
log.AppendLine("");
if ((m_ConversionReadyState & ConversionReadyState.AssetStoreInstallFound) == ConversionReadyState.AssetStoreInstallFound)
{
log.AppendLine("Removing existing ProBuilder files...");
if (RemoveAssetStoreFiles(m_AssetsToDeleteTreeView.GetRoot(), log))
{
log.AppendLine("\nRemapping Asset Ids...");
RemapAssetIds(log);
}
}
else
{
log.AppendLine("Remapping Asset Ids...");
RemapAssetIds(log);
}
}
finally
{
m_ConversionLog = log.ToString();
try
{
Directory.CreateDirectory("Temp");
File.WriteAllText(k_ConversionLogPath, m_ConversionLog);
}
catch
{
Debug.Log(m_ConversionLog);
}
EditorApplication.UnlockReloadAssemblies();
m_ConversionReadyState = ConversionReadyState.ConversionRan;
EditorApplication.delayCall += AssetDatabase.Refresh;
}
}
void DrawTreeSettings()
{
Vector2 iconSize = Styles.settingsIcon.CalcSize(m_AssetTreeSettingsContent);
Rect settingsRect = new Rect(
position.width - iconSize.x - 4,
4,
iconSize.x,
iconSize.y);
if (EditorGUI.DropdownButton(settingsRect, m_AssetTreeSettingsContent, FocusType.Passive, Styles.settingsIcon))
{
var menu = new GenericMenu();
menu.AddItem(new GUIContent("Reset"), false, ResetAssetsToDelete);
menu.ShowAsContext();
}
}
ConversionReadyState GetReadyState()
{
var state = ConversionReadyState.Ready;
if (ProjectContainsOldAssetIds())
state |= ConversionReadyState.DeprecatedAssetIdsFound;
if (PackageImporter.IsPreProBuilder4InProject())
state |= ConversionReadyState.AssetStoreInstallFound;
if (state == ConversionReadyState.Ready && PackageImporter.IsProBuilder4OrGreaterLoaded())
return ConversionReadyState.NoActionRequired;
state |= ValidateProjectTextSerialized();
state |= ValidateAssetStoreRemoval();
return state;
}
const int k_DialogOkay = 0;
const int k_DialogAlt = 1;
const int k_DialogCancel = 2;
void ResetAssetsToDelete()
{
m_DeprecatedProBuilderFound = PackageImporter.IsPreProBuilder4InProject();
if (m_DeprecatedProBuilderFound && !ValidateAssetStoreProBuilderRoot(m_DeprecatedProBuilderDirectory))
m_DeprecatedProBuilderDirectory = FindAssetStoreProBuilderInstall();
// If still no old folder found (and PackageImporter tells us one exists), ask the user to point it out
if (m_DeprecatedProBuilderFound && !ValidateAssetStoreProBuilderRoot(m_DeprecatedProBuilderDirectory))
{
int res = EditorUtility.DisplayDialogComplex(
"Could Not Find Existing ProBuilder Directory",
"Would you like to manually select the Asset Store installed ProBuilder folder and continue with the conversion process, or continue without removing old ProBuilder files (not recommended)?",
"Select Folder",
"Continue",
"Cancel");
if (res == k_DialogOkay)
{
// if they don't get it right after 3 attempts it's probably not going to happen and they'll be annoyed at
// an inescapable dialog loop
int userDirectoryPickAttempts = 0;
while (userDirectoryPickAttempts++ < 3)
{
m_DeprecatedProBuilderDirectory = EditorUtility.OpenFolderPanel("Select ProBuilder Directory", "Assets", "");
if (string.IsNullOrEmpty(m_DeprecatedProBuilderDirectory))
{
UnityEngine.Debug.LogWarning("Canceling ProBuilder Asset Store to Package Manager conversion. You may start this process again at any time by accessing the 'Tools>ProBuilder>Repair>Convert to ProBuilder 4' menu item.");
EditorApplication.delayCall += Close;
break;
}
if (ValidateAssetStoreProBuilderRoot(m_DeprecatedProBuilderDirectory))
{
// got a good directory, continue with process
break;
}
else
{
if (!EditorUtility.DisplayDialog("Selected Folder is not a ProBuilder Install",
"The folder selected not an old version of ProBuilder. Would you like to select a different directory?", "Yes",
"Cancel"))
{
EditorApplication.delayCall += Close;
break;
}
}
}
}
else if (res == k_DialogCancel)
{
UnityEngine.Debug.LogWarning("Canceling ProBuilder Asset Store to Package Manager conversion. You may start this process again at any time by accessing the 'Tools>ProBuilder>Repair>Convert to ProBuilder 4' menu item.");
EditorApplication.delayCall += Close;
}
}
m_AssetsToDeleteTreeView.directoryRoot = m_DeprecatedProBuilderDirectory;
m_AssetsToDeleteTreeView.SetDirectoryIgnorePatterns(k_AssetStoreDirectorySuggestedDeleteIgnoreFilter);
m_AssetsToDeleteTreeView.SetFileIgnorePatterns(k_AssetStoreSuggestedFileDeleteIgnoreFilter);
m_AssetsToDeleteTreeView.Reload();
m_AssetsToDeleteTreeView.ExpandAll();
m_MultiColumnHeader.ResizeToFit();
m_ConversionReadyState = GetReadyState();
}
bool RemoveAssetStoreFiles(BaseTreeViewItem root, StringBuilder log)
{
AssetTreeItem node = root as AssetTreeItem;
if (node != null && (node.enabled && !node.isMixedState))
{
if (!AssetDatabase.MoveAssetToTrash(node.fullPath))
{
if (!AssetDatabase.DeleteAsset(node.fullPath))
{
if (Directory.Exists(node.fullPath))
{
Directory.Delete(node.fullPath, true);
if (Directory.Exists(node.fullPath))
{
Debug.LogError("Directory.Delete failed, giving up. (" + node.fullPath + ")");
return false;
}
else
{
File.Delete(node.fullPath.Trim('/') + ".meta");
}
}
else if (File.Exists(node.fullPath))
{
File.Delete(node.fullPath);
if (File.Exists(node.fullPath))
{
Debug.LogError("File.Delete failed, giving up (" + node.fullPath + ")");
return true;
}
else
{
File.Delete(node.fullPath + ".meta");
}
}
}
}
log.AppendLine(" - " + node.fullPath);
return true;
}
if (node.children != null)
{
bool success = true;
foreach (var branch in node.children)
if (!RemoveAssetStoreFiles(branch, log))
success = false;
return success;
}
return true;
}
void RemapAssetIds(StringBuilder log)
{
AssetIdRemapObject remapObject = new AssetIdRemapObject();
JsonUtility.FromJsonOverwrite(m_RemapFile.text, remapObject);
int remappedReferences = 0;
int modifiedFiles = 0;
string[] assets = k_AssetExtensionsToRemap.SelectMany(x => Directory.GetFiles("Assets", x, SearchOption.AllDirectories)).ToArray();
var failures = new StringBuilder();
var successes = new StringBuilder();
int failCount = 0;
for (int i = 0, c = assets.Length; i < c; i++)
{
EditorUtility.DisplayProgressBar("Asset Id Remap", assets[i], i / (float)c);
int modified;
if (!DoAssetIdentifierRemap(assets[i], remapObject.map, out modified))
{
failures.AppendLine(" - " + assets[i]);
failCount++;
}
else
{
if (modified > 0)
{
successes.AppendLine(string.Format(" - ({0}) references in {1}", modified.ToString(), assets[i]));
modifiedFiles++;
}
}
remappedReferences += modified;
}
EditorUtility.ClearProgressBar();
log.AppendLine(string.Format("Remapped {0} references in {1} files.", remappedReferences.ToString(), modifiedFiles.ToString()));
log.AppendLine(string.Format("\nFailed remapping {0} files:", failCount.ToString()));
log.AppendLine(failCount > 0 ? failures.ToString() : " - (none)");
log.AppendLine("\nSuccessfully remapped files:");
log.Append(successes);
PackageImporter.Reimport(PackageImporter.EditorCorePackageManager);
AssetDatabase.Refresh();
}
static bool DoAssetIdentifierRemap(string path, IEnumerable<AssetIdentifierTuple> map, out int modified, bool remapSourceGuid = false)
{
modified = 0;
try
{
var sr = new StreamReader(path);
var sw = new StreamWriter(path + ".remap", false);
List<StringTuple> replace = new List<StringTuple>();
IEnumerable<AssetIdentifierTuple> assetIdentifierTuples = map as AssetIdentifierTuple[] ?? map.ToArray();
foreach (var kvp in assetIdentifierTuples)
{
if (kvp.source.fileId.Equals(kvp.destination.fileId) && kvp.source.guid.Equals(kvp.destination.guid))
continue;
replace.Add(new StringTuple(
string.Format("{{fileID: {0}, guid: {1}, type:", kvp.source.fileId, kvp.source.guid),
string.Format("{{fileID: {0}, guid: {1}, type:", kvp.destination.fileId, kvp.destination.guid)));
}
// If remapping in-place (ie, changing a package guids) then also apply to metadata
if (remapSourceGuid)
{
HashSet<string> used = new HashSet<string>();
foreach (var kvp in assetIdentifierTuples)
{
// AssetIdentifier list will contain duplicate guids (assets can contain sub-assets, separated by fileId)
// when swapping meta file guids we don't need multiple entries
if (used.Add(kvp.source.guid))
replace.Add(new StringTuple(
string.Format("guid: {0}", kvp.source.guid),
string.Format("guid: {0}", kvp.destination.guid)));
}
}
while (sr.Peek() > -1)
{
var line = sr.ReadLine();
foreach (var kvp in replace)
{
if (line.Contains(kvp.key))
{
modified++;
line = line.Replace(kvp.key, kvp.value);
break;
}
}
sw.WriteLine(line);
}
sr.Close();
sw.Close();
if (modified > 0)
{
File.Delete(path);
File.Move(path + ".remap", path);
}
else
{
File.Delete(path + ".remap");
}
}
catch
{
return false;
}
return true;
}
bool ProjectContainsOldAssetIds()
{
// todo this should only check with the loaded remap file, but for now it's hard-coded
return PackageImporter.IsPreProBuilder4InProject() || PackageImporter.DoesProjectContainDeprecatedGUIDs();
}
static string FindAssetStoreProBuilderInstall()
{
string[] matches = Directory.GetDirectories("Assets", "ProBuilder", SearchOption.AllDirectories);
foreach (var match in matches)
{
string dir = match.Replace("\\", "/") + "/";
if (ValidateAssetStoreProBuilderRoot(dir))
return dir;
}
return null;
}
/// <summary>
/// Is the ProBuilder folder an Asset Store installed version?
/// </summary>
/// <param name="dir"></param>
/// <returns></returns>
static bool ValidateAssetStoreProBuilderRoot(string dir)
{
return !string.IsNullOrEmpty(dir) &&
File.Exists(dir + "/Classes/ProBuilderCore-Unity5.dll") &&
File.Exists(dir + "/Editor/ProBuilderEditor-Unity5.dll");
}
ConversionReadyState ValidateAssetStoreRemoval()
{
ConversionReadyState state = (ConversionReadyState)0;
List<AssetTreeItem> assets = m_AssetsToDeleteTreeView.GetAssetList();
if (assets.Any(x => !x.enabled && k_AssetStoreMustDelete.Any(y => x.fullPath.Contains(y))))
state |= ConversionReadyState.AssetStoreDeleteError;
else
state |= ConversionReadyState.Ready;
if (assets.Any(x => !x.enabled && k_AssetStoreShouldDelete.Any(y => x.fullPath.Contains(y))))
state |= ConversionReadyState.AssetStoreDeleteWarning;
return state;
}
static ConversionReadyState ValidateProjectTextSerialized()
{
return EditorSettings.serializationMode == SerializationMode.ForceText
? ConversionReadyState.Ready
: ConversionReadyState.SerializationError;
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2fa4bbd1a7ccee24783998770d56522e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,316 @@
using System.IO;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEditor.IMGUI.Controls;
using UObject = UnityEngine.Object;
#if UNITY_6000_3_OR_NEWER
using BaseTreeView = UnityEditor.IMGUI.Controls.TreeView<int>;
using BaseTreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem<int>;
using BaseTreeViewState = UnityEditor.IMGUI.Controls.TreeViewState<int>;
#else
using BaseTreeView = UnityEditor.IMGUI.Controls.TreeView;
using BaseTreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem;
using BaseTreeViewState = UnityEditor.IMGUI.Controls.TreeViewState;
#endif
namespace UnityEngine.ProBuilder.AssetIdRemapUtility
{
sealed class AssetTreeItem : BaseTreeViewItem
{
string m_RelativePath;
string m_FullPath;
bool m_IsEnabled;
bool m_IsDirectory;
bool m_IsMixedState;
public AssetTreeItem(int id, string fullPath, string relativePath) : base(id, 0)
{
m_IsDirectory = Directory.Exists(fullPath);
m_FullPath = fullPath;
m_RelativePath = relativePath;
m_IsEnabled = true;
displayName = m_FullPath.Replace("\\", "/").Replace(Application.dataPath, "Assets/");
}
public bool enabled
{
get { return m_IsEnabled; }
set { m_IsEnabled = value; }
}
public bool isDirectory
{
get { return m_IsDirectory; }
set { m_IsDirectory = value; }
}
public string fullPath
{
get { return m_FullPath; }
}
public string relativePath
{
get { return m_RelativePath; }
}
public bool isMixedState { get { return m_IsMixedState; } }
public void SetEnabled(bool isEnabled)
{
enabled = isEnabled;
if (children != null)
{
foreach (var child in children)
{
AssetTreeItem asset = child as AssetTreeItem;
if (asset != null)
asset.SetEnabled(isEnabled);
}
}
var upstream = parent;
while (upstream != null)
{
var up = upstream as AssetTreeItem;
if (up != null && up.children != null)
{
AssetTreeItem firstChild = up.children.FirstOrDefault() as AssetTreeItem;
if (firstChild != null)
{
up.m_IsMixedState = up.children.Any(x =>
{
var y = x as AssetTreeItem;
return y.enabled != firstChild.enabled;
});
if (!up.m_IsMixedState)
up.enabled = firstChild.enabled;
}
else
{
up.m_IsMixedState = false;
}
}
upstream = upstream.parent;
}
}
}
class AssetTreeView : BaseTreeView
{
string m_RootDirectory = null;
GUIContent m_TempContent = new GUIContent();
Rect m_ToggleRect = new Rect(0, 0, 0, 0);
public string directoryRoot
{
get { return m_RootDirectory; }
set { m_RootDirectory = value; }
}
public AssetTreeItem GetRoot()
{
return rootItem.hasChildren
? rootItem.children.First() as AssetTreeItem
: null;
}
IEnumerable<Regex> m_DirectoryIgnorePatterns;
IEnumerable<Regex> m_FileIgnorePatterns;
public void SetDirectoryIgnorePatterns(string[] regexStrings)
{
m_DirectoryIgnorePatterns = regexStrings.Select(x => new Regex(x));
}
public void SetFileIgnorePatterns(string[] regexStrings)
{
m_FileIgnorePatterns = regexStrings.Select(x => new Regex(x));
}
public AssetTreeView(BaseTreeViewState state, MultiColumnHeader header) : base(state, header)
{
showBorder = true;
columnIndexForTreeFoldouts = 0;
rowHeight = 18f;
}
protected override BaseTreeViewItem BuildRoot()
{
AssetTreeItem root = new AssetTreeItem(0, Application.dataPath, "")
{
depth = -1,
enabled = false
};
if (string.IsNullOrEmpty(m_RootDirectory) || !Directory.Exists(m_RootDirectory))
{
// if root has no children and you SetupDepthsFromParentsAndChildren nullrefs are thrown
var list = new List<BaseTreeViewItem>() {};
SetupParentsAndChildrenFromDepths(root, list);
}
else
{
int nodeIndex = 0;
PopulateAssetTree(m_RootDirectory, root, ref nodeIndex);
SetupDepthsFromParentsAndChildren(root);
ApplyEnabledFilters(root);
}
return root;
}
void PopulateAssetTree(string directory, AssetTreeItem parent, ref int nodeIdIndex)
{
string unixDirectory = directory.Replace("\\", "/");
AssetTreeItem leaf = new AssetTreeItem(
nodeIdIndex++,
unixDirectory,
unixDirectory.Replace(parent.fullPath, "").Trim('/'))
{
enabled = true
};
parent.AddChild(leaf);
foreach (string path in Directory.GetFiles(directory, "*", SearchOption.TopDirectoryOnly))
{
if (path.StartsWith(".") || path.EndsWith(".meta"))
continue;
string unixPath = path.Replace("\\", "/");
leaf.AddChild(new AssetTreeItem(
nodeIdIndex++,
unixPath,
unixPath.Replace(unixDirectory, "").Trim('/')) { enabled = true });
}
foreach (string dir in Directory.GetDirectories(directory, "*", SearchOption.TopDirectoryOnly))
PopulateAssetTree(dir, leaf, ref nodeIdIndex);
}
public void ApplyEnabledFilters(BaseTreeViewItem root)
{
AssetTreeItem node = root as AssetTreeItem;
AssetTreeItem parent = root.parent as AssetTreeItem;
if (node != null)
{
if (node.isDirectory)
node.SetEnabled(
(parent == null || parent.enabled) &&
(m_DirectoryIgnorePatterns == null || !m_DirectoryIgnorePatterns.Any(x => x.IsMatch(node.fullPath))));
else
node.SetEnabled(
(parent == null || parent.enabled) &&
(m_FileIgnorePatterns == null || !m_FileIgnorePatterns.Any(x => x.IsMatch(node.fullPath))));
}
if (root.children != null)
foreach (var child in root.children)
ApplyEnabledFilters(child);
}
protected override void AfterRowsGUI()
{
if (rootItem.hasChildren)
return;
if (Event.current.type == EventType.Repaint)
{
Rect r = new Rect(treeViewRect);
// not sure why there is a two row pad to the treeViewRect
r.y -= rowHeight * 2;
GUI.Label(r, "No Existing ProBuilder Install Found", EditorStyles.centeredGreyMiniLabel);
}
}
protected override void RowGUI(RowGUIArgs args)
{
CenterRectUsingSingleLineHeight(ref args.rowRect);
args.rowRect.xMin += GetContentIndent(args.item);
AssetTreeItem item = args.item as AssetTreeItem;
m_TempContent.text = item.relativePath;
m_TempContent.tooltip = item.fullPath;
m_ToggleRect.x = args.rowRect.xMin;
m_ToggleRect.y = args.rowRect.yMin;
m_ToggleRect.width = 16;
m_ToggleRect.height = args.rowRect.height;
args.rowRect.xMin += m_ToggleRect.width;
EditorGUI.BeginChangeCheck();
EditorGUI.showMixedValue = item.isMixedState;
item.enabled = EditorGUI.Toggle(m_ToggleRect, "", item.enabled);
EditorGUI.showMixedValue = false;
if (EditorGUI.EndChangeCheck())
{
if (GetSelection().Any(x => FindItem(x, rootItem) == item))
{
foreach (int id in GetSelection())
{
var sel = FindItem(id, rootItem) as AssetTreeItem;
if (sel != null)
sel.SetEnabled(item.enabled);
}
}
else
{
item.SetEnabled(item.enabled);
}
}
bool guiEnabled = GUI.enabled;
GUI.enabled = item.enabled;
GUI.Label(args.rowRect, m_TempContent);
GUI.enabled = guiEnabled;
}
protected override void ContextClickedItem(int id)
{
var clicked = FindItem(id, rootItem) as AssetTreeItem;
if (clicked != null)
{
var menu = new GenericMenu();
menu.AddItem(new GUIContent("Show Asset"), false, () =>
{
EditorGUIUtility.PingObject(AssetDatabase.LoadAssetAtPath<UObject>(clicked.fullPath));
});
menu.ShowAsContext();
}
}
public List<AssetTreeItem> GetAssetList()
{
List<AssetTreeItem> assets = new List<AssetTreeItem>();
GatherTreeItems(rootItem as AssetTreeItem, assets);
return assets;
}
void GatherTreeItems(AssetTreeItem node, List<AssetTreeItem> list)
{
if (node == null)
return;
list.Add(node);
if (node.children != null)
foreach (var child in node.children)
if (child is AssetTreeItem)
GatherTreeItems(child as AssetTreeItem, list);
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 709975e9e21e4a52a8ea44cd4a779feb
timeCreated: 1512405263
@@ -0,0 +1,146 @@
using System;
using System.IO;
using System.Linq;
using System.Text;
using UnityEditor;
using UnityEngine;
#if UNITY_6000_5_OR_NEWER
using UnityEngine.Assemblies;
#endif
namespace UnityEngine.ProBuilder.AssetIdRemapUtility
{
static class PackageImporter
{
const string k_PackageManagerEditorCore = "e98d45d69e2c4936a7382af00fd45e58";
const string k_AssetStoreEditorCore = "4df21bd079886d84699ca7be1316c7a7";
const string k_ProBuilder2CoreGUID = "0472bdc8d6d15384d98f22ee34302f9c";
const string k_ProBuilder3CoreGUID = "4f0627da958b4bb78c260446066f065f";
static readonly string[] k_AssetStoreInstallGuids = new string[]
{
"0472bdc8d6d15384d98f22ee34302f9c", // ProBuilderCore
"b617d7797480df7499f141d87e13ebc5", // ProBuilderMeshOps
"4df21bd079886d84699ca7be1316c7a7" // ProBuilderEditor
};
static readonly string[] k_PackageManagerInstallGuids = new string[]
{
"4f0627da958b4bb78c260446066f065f", // Core
"9b27d8419276465b80eb88c8799432a1", // Mesh Ops
"e98d45d69e2c4936a7382af00fd45e58", // Editor
};
internal static string EditorCorePackageManager { get { return k_PackageManagerEditorCore; } }
internal static string EditorCoreAssetStore { get { return k_AssetStoreEditorCore; } }
internal static void SetEditorDllEnabled(string guid, bool isEnabled)
{
string dllPath = AssetDatabase.GUIDToAssetPath(guid);
var importer = AssetImporter.GetAtPath(dllPath) as PluginImporter;
if (importer != null)
{
importer.SetCompatibleWithAnyPlatform(false);
importer.SetCompatibleWithEditor(isEnabled);
}
}
internal static bool IsEditorPluginEnabled(string guid)
{
string path = AssetDatabase.GUIDToAssetPath(guid);
var importer = AssetImporter.GetAtPath(path) as PluginImporter;
if (!importer)
return false;
return importer.GetCompatibleWithEditor() && !importer.GetCompatibleWithAnyPlatform();
}
internal static void Reimport(string guid)
{
string dllPath = AssetDatabase.GUIDToAssetPath(guid);
if (!string.IsNullOrEmpty(dllPath))
AssetDatabase.ImportAsset(dllPath);
}
static bool AreAnyAssetsAreLoaded(string[] guids)
{
foreach (var id in guids)
{
if (AssetImporter.GetAtPath(AssetDatabase.GUIDToAssetPath(id)) != null)
return true;
}
return false;
}
static bool FileContainsString(string path, string a, string b)
{
using (var sr = new StreamReader(path))
{
while (sr.Peek() > -1)
{
var line = sr.ReadLine();
if (line.Contains(a) || line.Contains(b))
return true;
}
}
return false;
}
internal static bool DoesProjectContainDeprecatedGUIDs()
{
var scenes = Directory.GetFiles("Assets", "*.unity", SearchOption.AllDirectories);
var prefabs = Directory.GetFiles("Assets", "*.prefab", SearchOption.AllDirectories);
var count = (scenes.Length + prefabs.Length) - 1f;
var exit = count < 1f;
try
{
for (int n = 0; !exit && n < 2; n++)
{
var arr = n < 1 ? scenes : prefabs;
for (int i = 0, c = arr.Length; !exit && i < c; i++)
{
if (FileContainsString(arr[i], k_ProBuilder2CoreGUID, k_ProBuilder3CoreGUID))
return true;
exit = EditorUtility.DisplayCancelableProgressBar(
"Checking for Broken ProBuilder References",
"Scanning scene " + arr[i],
i / count);
}
}
}
finally
{
EditorUtility.ClearProgressBar();
}
return false;
}
/// <summary>
/// Check if any pre-4.0 ProBuilder package is present in the project
/// </summary>
/// <returns></returns>
internal static bool IsPreProBuilder4InProject()
{
return AreAnyAssetsAreLoaded(k_AssetStoreInstallGuids)
|| AreAnyAssetsAreLoaded(k_PackageManagerInstallGuids);
}
internal static bool IsProBuilder4OrGreaterLoaded()
{
#if UNITY_6000_5_OR_NEWER
return CurrentAssemblies.GetLoadedAssemblies().Any(x => x.ToString().Contains("Unity.ProBuilder"));
#else
return AppDomain.CurrentDomain.GetAssemblies().Any(x => x.ToString().Contains("Unity.ProBuilder"));
#endif
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: bb48793c33304c1ca4300c46c9c13b46
timeCreated: 1512069815
@@ -0,0 +1,10 @@
{
"name": "Unity.ProBuilder.AssetIdRemapUtility",
"references": [],
"optionalUnityReferences": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9caa7e155cb0648da84dca829b17620f
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 42772189aba88e14083aeac0eaa2c814
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 04a0feda657064ccbb5cc36319dfcf16
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aed528667fa2e4e27b4a1fba64e57186
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,204 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-8440427243093808108
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 0
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Checker
m_Shader: {fileID: 4800000, guid: 8547ec39534635c4289065e5c5033f43, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _DISABLE_SSR_TRANSPARENT
- _EMISSION
m_LightmapFlags: 3
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2225
stringTagMap:
MotionVector: User
disabledShaderPasses:
- MOTIONVECTORS
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- RayTracingPrepass
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 2b3b02d65d5a24a20a12332c4125d74b, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaCutoffEnable: 0
- _AlphaDstBlend: 0
- _AlphaSrcBlend: 1
- _BUILTIN_QueueControl: 1
- _BUILTIN_QueueOffset: 0
- _BlendMode: 0
- _BumpScale: 1
- _ConservativeDepthOffsetEnable: 0
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.5
- _DepthOffsetEnable: 0
- _DetailNormalMapScale: 1
- _DoubleSidedEnable: 0
- _DoubleSidedGIMode: 0
- _DoubleSidedNormalMode: 2
- _DstBlend: 0
- _DstBlend2: 0
- _EmissionScaleUI: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _ExcludeFromTUAndAA: 0
- _Gloss: 0.8
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _MaterialID: 1
- _MaterialTypeMask: 2
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _OpaqueCullMode: 2
- _Parallax: 0.02
- _PerPixelSorting: 0
- _QueueControl: 0
- _QueueOffset: 0
- _RayTracing: 0
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RefractionModel: 0
- _RenderQueueType: 1
- _RequireSplitLighting: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRefDepth: 8
- _StencilRefDistortionVec: 4
- _StencilRefGBuffer: 10
- _StencilRefMV: 40
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 9
- _StencilWriteMaskDistortionVec: 4
- _StencilWriteMaskGBuffer: 15
- _StencilWriteMaskMV: 41
- _SupportDecals: 1
- _SurfaceType: 0
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UVSec: 0
- _UseShadowThreshold: 0
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestTransparent: 4
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &2537888133340746626
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 13
hdPluginSubTargetMaterialVersions:
m_Keys: []
m_Values:
--- !u!114 &3237147536486810191
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4717b199010ca4cb3a8a7a465ec457d2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4f6e01a3849934e69a960a5b6a0ec949
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

@@ -0,0 +1,184 @@
fileFormatVersion: 2
guid: 2b3b02d65d5a24a20a12332c4125d74b
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationMethod: 0
spriteTessellationDetail: -1
spriteGeometrySubdivision: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: CloudRendering
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Switch
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreXboxOne
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreScarlett
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

@@ -0,0 +1,184 @@
fileFormatVersion: 2
guid: 7e4b97337334f42d2a700647fd938234
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationMethod: 0
spriteTessellationDetail: -1
spriteGeometrySubdivision: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: CloudRendering
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Switch
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreXboxOne
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreScarlett
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

@@ -0,0 +1,184 @@
fileFormatVersion: 2
guid: 464ca14f3cfaf433582758afa13a9473
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationMethod: 0
spriteTessellationDetail: -1
spriteGeometrySubdivision: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: CloudRendering
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Switch
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreXboxOne
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreScarlett
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

@@ -0,0 +1,184 @@
fileFormatVersion: 2
guid: b3fd87e2e956e41b0b43f76bb50a4934
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationMethod: 0
spriteTessellationDetail: -1
spriteGeometrySubdivision: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: CloudRendering
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Switch
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreXboxOne
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreScarlett
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 681e2a77546fa4aeea345b40dae7de04
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 86a33916cf3294ac7ab58f89c2aa40b9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Collider
m_Shader: {fileID: 203, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 7e4b97337334f42d2a700647fd938234, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _Cutoff: 0.5
- _InvFade: 1
m_Colors:
- _Color: {r: 0, g: 1, b: 0, a: 0.65882355}
- _TintColor: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 0.5019608}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bbb235fff4f48426b863b36058ab66d2
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,29 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: InvisibleFace
m_Shader: {fileID: 4800000, guid: cfa7edf01005f4e338d973cea2f6eab3, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _InvFade: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 0}
- _TintColor: {r: 0.63432837, g: 0.63432837, b: 0.63432837, a: 0}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 978bbcf5050244f1b95128c04103f628
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,27 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: NoDraw
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2000
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: 464ca14f3cfaf433582758afa13a9473, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: []
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8cb4d6fee77fd4ee6895f08b240d625f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,236 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-7074452015321469258
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 639247ca83abc874e893eb93af2b5e44, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 0
--- !u!114 &-3637609125716766867
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 13
hdPluginSubTargetMaterialVersions:
m_Keys: []
m_Values:
--- !u!114 &-2862832523495942279
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: ProBuilderDefault
m_Shader: {fileID: 4800000, guid: 8547ec39534635c4289065e5c5033f43, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _DISABLE_SSR_TRANSPARENT
- _EMISSION
m_LightmapFlags: 3
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
MotionVector: User
disabledShaderPasses:
- MOTIONVECTORS
- TransparentDepthPrepass
- TransparentDepthPostpass
- TransparentBackface
- RayTracingPrepass
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FirstTex:
m_Texture: {fileID: 2800000, guid: eb18006e3122d7e4a84e8ef8b708df02, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FourthTex:
m_Texture: {fileID: 2800000, guid: 6b2e75e162ed72c428ddc9ca9cac6452, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 6344bf96fbda94141a525046d088fb23, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Occlusion:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SecondTex:
m_Texture: {fileID: 2800000, guid: 20fa208453803ab41b65dfe6fe92c848, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ThirdTex:
m_Texture: {fileID: 2800000, guid: 478de9d1d3cbac64bad0d9feaad9e272, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AddPrecomputedVelocity: 0
- _AlphaCutoffEnable: 0
- _AlphaDstBlend: 0
- _AlphaSrcBlend: 1
- _AlphaTestRef: 0.5
- _Amplitude: 0.33928573
- _Angle: 0.46428573
- _BUILTIN_QueueControl: 0
- _BUILTIN_QueueOffset: 0
- _BlendMode: 0
- _BumpScale: 1
- _ConservativeDepthOffsetEnable: 0
- _CullMode: 2
- _CullModeForward: 2
- _Cutoff: 0.27
- _DepthOffsetEnable: 0
- _DetailNormalMapScale: 1
- _DoubleSidedEnable: 0
- _DoubleSidedGIMode: 0
- _DoubleSidedNormalMode: 2
- _DstBlend: 0
- _DstBlend2: 0
- _EmissionScaleUI: 0
- _EnableBlendModePreserveSpecularLighting: 1
- _EnableFogOnTransparent: 1
- _ExcludeFromTUAndAA: 0
- _Gloss: 0.5
- _Glossiness: 0.48
- _Lightmapping: 1
- _MaterialID: 1
- _MaterialTypeMask: 2
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _OpaqueCullMode: 2
- _Parallax: 0.02
- _PerPixelSorting: 0
- _Phase: 1
- _QueueControl: 0
- _QueueOffset: 0
- _RayTracing: 0
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RefractionModel: 0
- _RenderQueueType: 1
- _RequireSplitLighting: 0
- _Size: 25
- _SrcBlend: 1
- _StencilRef: 0
- _StencilRefDepth: 8
- _StencilRefDistortionVec: 4
- _StencilRefGBuffer: 10
- _StencilRefMV: 40
- _StencilWriteMask: 6
- _StencilWriteMaskDepth: 9
- _StencilWriteMaskDistortionVec: 4
- _StencilWriteMaskGBuffer: 15
- _StencilWriteMaskMV: 41
- _SupportDecals: 1
- _SurfaceType: 0
- _TransmissionEnable: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UVSec: 1
- _UseShadowThreshold: 0
- _Wavelength: 0.17857142
- _ZTestDepthEqualForOpaque: 3
- _ZTestGBuffer: 4
- _ZTestTransparent: 4
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _Color1: {r: 0.67910445, g: 0.67910445, b: 0.67910445, a: 1}
- _Color2: {r: 0.14179105, g: 0.14179105, b: 0.14179105, a: 1}
- _DoubleSidedConstants: {r: 1, g: 1, b: -1, a: 0}
- _EmissionColor: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColorUI: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColorWithMapUI: {r: 1, g: 1, b: 1, a: 1}
- _Indicator: {r: 1, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c22777d6e868e4f2fb421913386b154e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,29 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Trigger
m_Shader: {fileID: 203, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 2800000, guid: b3fd87e2e956e41b0b43f76bb50a4934, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _InvFade: 1
m_Colors:
- _Color: {r: 1, g: 0.60839164, b: 0, a: 1}
- _TintColor: {r: 0.63432837, g: 0.63432837, b: 0.63432837, a: 0.5019608}
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a1e97cbf2538241b691aae8243b5fb10
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f34d08485a9ab475e894ee6a078091e3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

@@ -0,0 +1,184 @@
fileFormatVersion: 2
guid: 6344bf96fbda94141a525046d088fb23
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 1024
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationMethod: 0
spriteTessellationDetail: -1
spriteGeometrySubdivision: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 1
swizzle: 50462976
cookieLightType: 1
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: CloudRendering
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Switch
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Android
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreXboxOne
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: GameCoreScarlett
maxTextureSize: 1024
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2fd0621f5ae921e44802d0469d771565
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 048578cfc1b66cf489e58d5d269543d3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: EdgePicker
m_Shader: {fileID: 4800000, guid: 86212504c7e9f468db2300dc5932dc17, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Floats: []
m_Colors: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4ff996e3a0a5743a3987ab6231160665
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,60 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6385779826880740979
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: EdgePickerURP
m_Shader: {fileID: 4800000, guid: 5a6aaaf03bf583c4e9adee705d3255d7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
- _Tint: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 70d1a6407fa29bb44b936d5325490696
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,31 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: FacePicker
m_Shader: {fileID: 4800000, guid: c84d57d423a2042eb92da86f9fa670a3, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats: []
m_Colors:
- _Tint: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5695904020f064fdab5ad265b274a616
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,60 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: FacePickerURP
m_Shader: {fileID: 4800000, guid: 9cb691ed12f573842860b94cad8331e1, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
- _Tint: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &4155378413201584216
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0143c5b21b48c1643bc5417c60bbf848
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,22 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: VertexPicker
m_Shader: {fileID: 4800000, guid: c26db15b9a2ed4b2ebefefd26ce85ae1, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Floats: []
m_Colors: []
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 30a8575e1d4cc4e01a88ffbf4f973d80
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,60 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-8161258857830796102
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: VertexPickerURP
m_Shader: {fileID: 4800000, guid: 488491a14dff2924db58a2ddc0b9e26f, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 5
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses:
- MOTIONVECTORS
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors:
- _BaseColor: {r: 0, g: 0, b: 0, a: 1}
- _Tint: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: eae7185451278b54bb78d0d5ff3f9452
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5df5a982723854050988cf6a154ce9af
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,54 @@
Shader "ProBuilder/Diffuse Texture Blend"
{
Properties
{
_FirstTex ("Texture", 2D) = "white" {}
_SecondTex ("Texture", 2D) = "white" {}
_ThirdTex ("Texture", 2D) = "white" {}
_FourthTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType" = "Opaque" }
ColorMask RGB
CGPROGRAM
#pragma surface surf Lambert
sampler2D _FirstTex;
sampler2D _SecondTex;
sampler2D _ThirdTex;
sampler2D _FourthTex;
struct Input
{
float4 color : COLOR;
float2 uv_FirstTex;
float2 uv_SecondTex;
float2 uv_ThirdTex;
float2 uv_FourthTex;
};
void surf (Input IN, inout SurfaceOutput o)
{
fixed4 c0 = tex2D(_FirstTex, IN.uv_FirstTex);
fixed4 c1 = tex2D(_SecondTex, IN.uv_SecondTex);
fixed4 c2 = tex2D(_ThirdTex, IN.uv_ThirdTex);
fixed4 c3 = tex2D(_FourthTex, IN.uv_FourthTex);
fixed4 blend = normalize(IN.color);
fixed4 rgba = c0 * blend.r;
rgba = lerp(rgba, c1, blend.g);
rgba = lerp(rgba, c2, blend.b);
rgba = lerp(rgba, c3, blend.a);
o.Albedo = rgba.rgb;
}
ENDCG
}
Fallback "Diffuse"
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 33cb4e8ff0c1d43ac8ec40692656c7ed
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,28 @@
Shader "ProBuilder/Diffuse Vertex Color" {
Properties {
_MainTex ("Texture", 2D) = "white" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
ColorMask RGB
CGPROGRAM
#pragma surface surf Lambert
sampler2D _MainTex;
struct Input {
float4 color : COLOR;
float2 uv_MainTex;
};
void surf (Input IN, inout SurfaceOutput o) {
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * IN.color;
o.Albedo = c.rgb;
}
ENDCG
}
Fallback "Diffuse"
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 911130a939bf84843bcc4211c327f579
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,59 @@
Shader "Hidden/ProBuilder/EdgePicker"
{
Properties {}
SubShader
{
Tags
{
"ProBuilderPicker"="EdgePass"
"IgnoreProjector"="True"
"DisableBatching"="True"
"LightMode"="Always"
}
Lighting Off
ZTest LEqual
ZWrite On
Cull Off
Blend Off
Pass
{
Name "Edges"
AlphaTest Greater .25
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "ProBuilderCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float4 color : COLOR;
};
struct v2f
{
float4 pos : SV_POSITION;
float4 color : COLOR;
};
v2f vert (appdata v)
{
v2f o;
o.pos = UnityObjectToClipPosWithOffset(v.vertex.xyz);
o.color = v.color;
return o;
}
float4 frag (v2f i) : COLOR
{
return i.color;
}
ENDCG
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 86212504c7e9f468db2300dc5932dc17
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,67 @@
Shader "Hidden/ProBuilder/EdgePickerURP"
{
SubShader
{
PackageRequirements
{
"com.unity.render-pipelines.universal": "17.0"
}
Tags
{
"ProBuilderPicker"="EdgePass"
"RenderType"="Opaque"
"RenderPipeline"="UniversalPipeline"
"Queue"="Geometry"
"IgnoreProjector"="True"
"DisableBatching"="True"
}
Pass
{
Name "Edges"
Tags { "LightMode"="ProBuilderPickerA" }
ZTest Less
ZWrite On
Cull Off
Blend Off
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "ProBuilderCG_URP.hlsl"
struct Attributes
{
float4 positionOS : POSITION;
float4 color : COLOR;
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 color : COLOR;
};
Varyings vert(Attributes input)
{
Varyings output;
output.positionCS = UnityObjectToClipPosWithOffset(input.positionOS.xyz);
output.color = input.color;
return output;
}
half4 frag(Varyings input) : SV_Target
{
clip(input.color.a - 0.75);
return input.color;
}
ENDHLSL
}
}
// Fallback to built-in renderer version
Fallback "Hidden/ProBuilder/EdgePicker"
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5a6aaaf03bf583c4e9adee705d3255d7
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,60 @@
Shader "Hidden/ProBuilder/FaceHighlight"
{
Properties
{
_Color ("Color Tint", Color) = (1,1,1,1)
_Dither ("Dithering", float) = 0
_HandleZTest ("_HandleZTest", Int) = 8
_HandleZWrite("_HandleZWrite", Int) = 0
}
SubShader
{
Tags { "IgnoreProjector"="True" "Queue"="Transparent" }
Lighting Off
ZTest [_HandleZTest]
ZWrite [_HandleZWrite]
Cull Off
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "ProBuilderCG.cginc"
float4 _Color;
float _Dither;
struct appdata
{
float4 vertex : POSITION;
};
struct v2f
{
float4 pos : SV_POSITION;
};
v2f vert (appdata v)
{
v2f o;
o.pos = UnityObjectToClipPosWithOffset(v.vertex.xyz);
return o;
}
half4 frag (v2f i) : COLOR
{
i.pos.xy = floor(i.pos.xy * 1) * .5;
float checker = -frac(i.pos.x + i.pos.y);
clip(lerp(1, checker, _Dither));
return _Color;
}
ENDCG
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6f37d9e45fbae41b386f76d3bfefec4a
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,52 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "Hidden/ProBuilder/FacePicker"
{
SubShader
{
Tags { "ProBuilderPicker"="Base" "LightMode"="Always" }
Lighting Off
ZTest LEqual
ZWrite On
Cull Back
Blend Off
Pass
{
Name "Base"
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float4 color : COLOR;
};
struct v2f
{
float4 pos : SV_POSITION;
float4 color : COLOR;
};
v2f vert (appdata v)
{
v2f o;
o.pos = UnityObjectToClipPos(v.vertex);
o.color = v.color;
return o;
}
float4 frag (v2f i) : COLOR
{
return i.color;
}
ENDCG
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c84d57d423a2042eb92da86f9fa670a3
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,68 @@
Shader "Hidden/ProBuilder/FacePickerURP"
{
SubShader
{
PackageRequirements
{
"com.unity.render-pipelines.universal": "17.0"
}
Tags
{
"ProBuilderPicker"="Base"
"RenderType"="Opaque"
"RenderPipeline"="UniversalPipeline"
"Queue"="Geometry"
"DisableBatching"="True"
}
Pass
{
Name "Base"
Tags { "LightMode"="ProBuilderPickerA" }
ZTest LEqual
ZWrite On
Cull Back
Blend Off
HLSLPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
#include "ProBuilderCG_URP.hlsl"
struct Attributes
{
float4 positionOS : POSITION;
float4 color : COLOR;
};
struct Varyings
{
float4 positionCS : SV_POSITION;
float4 color : COLOR;
};
Varyings vert(Attributes input)
{
Varyings output;
VertexPositionInputs positions = GetVertexPositionInputs(input.positionOS.xyz);
output.positionCS = positions.positionCS;
output.color = input.color;
return output;
}
half4 frag(Varyings input) : SV_Target
{
return input.color;
}
ENDHLSL
}
}
// Fallback to built-in renderer version
Fallback "Hidden/ProBuilder/FacePicker"
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 9cb691ed12f573842860b94cad8331e1
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,44 @@
Shader "Hidden/ProBuilder/HideVertices"
{
SubShader
{
Tags { "IgnoreProjector"="True" "RenderType"="Geometry" }
Lighting Off
ZTest On
ZWrite On
Cull Back
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
};
struct v2f
{
float4 pos : SV_POSITION;
};
v2f vert (appdata v)
{
v2f o;
o.pos = fixed4(0,0,0,0);
return o;
}
half4 frag (v2f i) : COLOR
{
return fixed4(0,0,0,0);
}
ENDCG
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: cfa7edf01005f4e338d973cea2f6eab3
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,107 @@
Shader "Hidden/ProBuilder/LineBillboard"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_Scale ("Scale", Range(0, 20)) = 7
_HandleZTest ("_HandleZTest", Int) = 8
_HandleZWrite("_HandleZWrite", Int) = 0
}
SubShader
{
Tags
{
"ProBuilderPicker"="EdgePass"
"RenderType"="Geometry"
"Queue"="Geometry"
"DisableBatching"="True"
"ForceNoShadowCasting"="True"
"IgnoreProjector"="True"
}
Lighting Off
ZTest [_HandleZTest]
ZWrite [_HandleZWrite]
Cull Off
Blend Off
Offset -1, -1
Pass
{
Name "EdgePass"
CGPROGRAM
#pragma target 4.0
#pragma vertex vert
#pragma geometry geo
#pragma fragment frag
#pragma exclude_renderers metal
#include "UnityCG.cginc"
#include "ProBuilderCG.cginc"
struct appdata
{
float4 vertex : POSITION;
fixed4 color : COLOR;
};
struct v2f
{
float4 pos : SV_POSITION;
fixed4 color : COLOR;
};
float _Scale;
float4 _Color;
v2f vert (appdata v)
{
v2f o;
o.pos = float4(UnityObjectToViewPos(v.vertex.xyz), 1);
// pull closer to camera and into clip space
o.pos *= .99;
o.pos = mul(UNITY_MATRIX_P, o.pos);
// convert clip -> ndc -> screen, build billboards in geo shader, then screen -> ndc -> clip
o.pos = ClipToScreen(o.pos);
o.color = v.color;
return o;
}
[maxvertexcount(4)]
void geo(line v2f p[2], inout TriangleStream<v2f> triStream)
{
float2 perp = normalize(float2(-(p[1].pos.y - p[0].pos.y), p[1].pos.x - p[0].pos.x)) * _Scale;
v2f geo_out;
geo_out.pos = ScreenToClip( float4(p[1].pos.x + perp.x, p[1].pos.y + perp.y, p[1].pos.z, p[1].pos.w) );
geo_out.color = p[1].color;
triStream.Append(geo_out);
geo_out.pos = ScreenToClip( float4(p[1].pos.x - perp.x, p[1].pos.y - perp.y, p[1].pos.z, p[1].pos.w) );
geo_out.color = p[1].color;
triStream.Append(geo_out);
geo_out.pos = ScreenToClip( float4(p[0].pos.x + perp.x, p[0].pos.y + perp.y, p[0].pos.z, p[0].pos.w) );
geo_out.color = p[0].color;
triStream.Append(geo_out);
geo_out.pos = ScreenToClip( float4(p[0].pos.x - perp.x, p[0].pos.y - perp.y, p[0].pos.z, p[0].pos.w) );
geo_out.color = p[0].color;
triStream.Append(geo_out);
}
fixed4 frag (v2f i) : COLOR
{
return i.color * _Color;
}
ENDCG
}
}
Fallback Off
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 4293210a3280c4283b9872316017f1f9
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,78 @@
Shader "Hidden/ProBuilder/LineBillboardMetal"
{
Properties
{
_Scale("Scale", Range(1,7)) = 3.3
_Color ("Color", Color) = (1,1,1,1)
_HandleZTest ("_HandleZTest", Int) = 8
_HandleZWrite("_HandleZWrite", Int) = 0
}
SubShader
{
Tags
{
"IgnoreProjector"="True"
"RenderType"="Geometry"
"Queue"="Geometry"
"DisableBatching"="True"
}
Lighting Off
ZTest [_HandleZTest]
ZWrite [_HandleZWrite]
Cull Off
Blend Off
Offset -1,-1
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
#include "ProBuilderCG.cginc"
float _Scale;
float4 _Color;
struct appdata
{
float4 vertex : POSITION;
// next vertex is stored in xyz, and direction to move current vertex is w
float4 tangent : TANGENT;
};
struct v2f
{
float4 pos : SV_POSITION;
};
v2f vert (appdata v)
{
v2f o;
o.pos = UnityObjectToClipPosWithOffsetMetal(v.vertex.xyz);
// convert vertex to screen space, add pixel-unit xy to vertex, then transform back to clip space.
float4 clip = o.pos;
float4 a = ClipToScreen(o.pos);
float4 b = ClipToScreen(UnityObjectToClipPosWithOffset(v.tangent.xyz));
float2 d = normalize(b-a).xy;
float2 p = float2(-d.y, d.x);
a.xy += p * v.tangent.w * _Scale;
o.pos = ScreenToClip(a);
return o;
}
half4 frag (v2f i) : COLOR
{
return _Color;
}
ENDCG
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 4300ae919783d4fa38001d745fbdecc1
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,55 @@
Shader "Hidden/ProBuilder/NormalPreview"
{
SubShader
{
Tags { "Queue"="AlphaTest" "IgnoreProjector"="True" "RenderType"="Geometry" }
Lighting Off
ZTest LEqual
Blend SrcAlpha OneMinusSrcAlpha
ZWrite On
Cull Off
Pass
{
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
float _Scale;
struct appdata
{
float4 vertex : POSITION;
// secretely this is the normal, w is used to pass extrusion
float4 tangent : TANGENT;
};
struct v2f
{
float4 pos : SV_POSITION;
float4 color : COLOR;
};
v2f vert (appdata v)
{
v2f o;
float4 world = mul(unity_ObjectToWorld, v.vertex);
float3 nrm = UnityObjectToWorldNormal(v.tangent.xyz);
float4 extruded = world + float4((nrm * v.tangent.w * _Scale), 0);
o.pos = mul(UNITY_MATRIX_VP, extruded);
o.color = float4(abs(v.tangent.xyz), 1);
return o;
}
half4 frag (v2f i) : COLOR
{
return i.color;
}
ENDCG
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a07688e921e974338945464731e069ce
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,131 @@
Shader "Hidden/ProBuilder/PointBillboard"
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
_Scale ("Scale", Range(0, 20)) = 7
_HandleZTest ("_HandleZTest", Int) = 8
_HandleZWrite("_HandleZWrite", Int) = 0
}
SubShader
{
Tags
{
"ProBuilderPicker"="VertexPass"
"RenderType"="Geometry"
"Queue"="Geometry"
"IgnoreProjector"="True"
"ForceNoShadowCasting"="True"
"DisableBatching"="True"
}
Pass
{
Name "VertexPass"
Lighting Off
ZTest [_HandleZTest]
ZWrite [_HandleZWrite]
Cull Off
Blend Off
Offset 0, -2
CGPROGRAM
#pragma target 4.0
#pragma vertex vert
#pragma fragment frag
#pragma geometry geo
#pragma exclude_renderers metal
#include "UnityCG.cginc"
struct appdata
{
float4 vertex : POSITION;
float4 color : COLOR;
};
struct GS_INPUT
{
float4 pos : POSITION;
float4 color : COLOR;
};
struct FS_INPUT
{
float4 pos : POSITION;
float4 color : COLOR;
};
float _Scale;
float4 _Color;
// Is the camera in orthographic mode? (1 yes, 0 no)
#define ORTHO (1 - UNITY_MATRIX_P[3][3])
#define ScreenDepthModifier (lerp(.00001, 0, ORTHO))
float4 ClipToScreen(float4 v)
{
v.xy /= v.w;
v.xy = v.xy * .5 + .5;
v.xy *= _ScreenParams.xy;
return v;
}
float4 ScreenToClip(float4 v)
{
v.xy /= _ScreenParams.xy;
v.xy = (v.xy - .5) / .5;
v.xy *= v.w;
return v;
}
GS_INPUT vert(appdata v)
{
GS_INPUT output = (GS_INPUT)0;
output.pos = float4(UnityObjectToViewPos(v.vertex.xyz), 1);
// perspective rendering applies offset in view coordinates, and orthographic applies offset in the geometry
// shader screen space
output.pos.xyz *= lerp(1, .95, ORTHO);
output.pos = mul(UNITY_MATRIX_P, output.pos);
// convert clip -> ndc -> screen, build billboards in geo shader, then screen -> ndc -> clip
output.pos = ClipToScreen(output.pos);
output.color = v.color;
return output;
}
[maxvertexcount(4)]
void geo(point GS_INPUT p[1], inout TriangleStream<FS_INPUT> triStream)
{
// 3 1
// 2 0
FS_INPUT geo_out;
geo_out.color = p[0].color;
geo_out.pos = ScreenToClip( float4(p[0].pos.x + _Scale, p[0].pos.y - _Scale, p[0].pos.z, p[0].pos.w - ScreenDepthModifier) );
triStream.Append(geo_out);
geo_out.pos = ScreenToClip( float4(p[0].pos.x + _Scale, p[0].pos.y + _Scale, p[0].pos.z, p[0].pos.w - ScreenDepthModifier) );
triStream.Append(geo_out);
geo_out.pos = ScreenToClip( float4(p[0].pos.x - _Scale, p[0].pos.y - _Scale, p[0].pos.z, p[0].pos.w - ScreenDepthModifier) );
triStream.Append(geo_out);
geo_out.pos = ScreenToClip( float4(p[0].pos.x - _Scale, p[0].pos.y + _Scale, p[0].pos.z, p[0].pos.w - ScreenDepthModifier) );
triStream.Append(geo_out);
}
float4 frag(FS_INPUT input) : COLOR
{
return _Color * input.color;
}
ENDCG
}
}
Fallback Off
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8ca8b34aa013842f3b399b6961e7dc3b
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,61 @@
// Is the camera in orthographic mode? (1 yes, 0 no)
#define ORTHO (1 - UNITY_MATRIX_P[3][3])
// How far to pull vertices towards camera in orthographic mode
const float ORTHO_CAM_OFFSET = .0001;
inline float4 ClipToScreen(float4 v)
{
v.xy /= v.w;
v.xy = v.xy * .5 + .5;
v.xy *= _ScreenParams.xy;
return v;
}
inline float4 ScreenToClip(float4 v)
{
v.z -= ORTHO_CAM_OFFSET * ORTHO;
v.xy /= _ScreenParams.xy;
v.xy = (v.xy - .5) / .5;
v.xy *= v.w;
return v;
}
inline float4 UnityObjectToClipPosWithOffset(float3 pos)
{
float4 ret = float4(UnityObjectToViewPos(pos), 1);
//Offsetting the edges to avoid z-fighting problems
//Do not offset when using orthographic camera as XY are
//screen coords, this would shift the rendering
ret.xyz *= lerp(.99, 1, unity_OrthoParams.w);
//Moving edges closer
//.99 is not sufficient for Orthographic Camera
ret.z *= lerp(1, 0.95, unity_OrthoParams.w);
return mul(UNITY_MATRIX_P, ret);
}
inline float4 UnityObjectToClipPosWithOffsetMetal(float3 pos)
{
float4 ret = float4(UnityObjectToViewPos(pos), 1);
ret *= lerp(.99, .95, ORTHO);
return mul(UNITY_MATRIX_P, ret);
}
inline float4 GetPickerColor(float4 pos, float2 texcoord1)
{
// convert vertex to screen space, add pixel-unit xy to vertex, then transform back to clip space.
float4 clip = pos;
clip.xy /= clip.w;
clip.xy = clip.xy * .5 + .5;
clip.xy *= _ScreenParams.xy;
clip.xy += texcoord1.xy * 3.5;
clip.z -= .0001 * (1 - UNITY_MATRIX_P[3][3]);
clip.xy /= _ScreenParams.xy;
clip.xy = (clip.xy - .5) / .5;
clip.xy *= clip.w;
return clip;
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6aba455f32e574b6e86ede4acd901efa
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,70 @@
// ProBuilderCG_URP.cginc - URP-compatible version of ProBuilderCG.cginc
// Must be included AFTER: #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
// so that TransformObjectToWorld, TransformWorldToView, UNITY_MATRIX_P, unity_OrthoParams are available.
// Is the camera in orthographic mode? (1 yes, 0 no)
#define ORTHO (1 - UNITY_MATRIX_P[3][3])
// How far to pull vertices towards camera in orthographic mode
const float ORTHO_CAM_OFFSET = .0001;
inline float4 ClipToScreen(float4 v)
{
v.xy /= v.w;
v.xy = v.xy * .5 + .5;
v.xy *= _ScreenParams.xy;
return v;
}
inline float4 ScreenToClip(float4 v)
{
v.z -= ORTHO_CAM_OFFSET * ORTHO;
v.xy /= _ScreenParams.xy;
v.xy = (v.xy - .5) / .5;
v.xy *= v.w;
return v;
}
inline float4 UnityObjectToClipPosWithOffset(float3 positionOS)
{
VertexPositionInputs positions = GetVertexPositionInputs(positionOS);
float4 ret = float4(positions.positionVS, 1);
//Offsetting the edges to avoid z-fighting problems
//Do not offset when using orthographic camera as XY are
//screen coords, this would shift the rendering
ret.xyz *= lerp(0.99, 0.95, unity_OrthoParams.w);
//Moving edges closer
//.99 is not sufficient for Orthographic Camera
ret.w *= lerp(1, 0.95, unity_OrthoParams.w);
return mul(UNITY_MATRIX_P, ret);
}
inline float4 UnityObjectToClipPosWithOffsetMetal(float3 positionOS)
{
VertexPositionInputs positions = GetVertexPositionInputs(positionOS);
float4 ret = float4(positions.positionVS, 1);
ret *= lerp(.99, .95, ORTHO);
return mul(UNITY_MATRIX_P, ret);
}
inline float4 GetPickerColor(float4 pos, float2 texcoord1)
{
// convert vertex to screen space, add pixel-unit xy to vertex, then transform back to clip space.
float4 clip = pos;
clip.xy /= clip.w;
clip.xy = clip.xy * .5 + .5;
clip.xy *= _ScreenParams.xy;
clip.xy += texcoord1.xy * 3.5;
clip.z -= .0001 * (1 - UNITY_MATRIX_P[3][3]);
clip.xy /= _ScreenParams.xy;
clip.xy = (clip.xy - .5) / .5;
clip.xy *= clip.w;
return clip;
}
@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ee82fff19db555c45baac786068d84fe
ShaderIncludeImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,67 @@
// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'
Shader "ProBuilder/Reference Unlit"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags
{
"Queue"="Transparent"
"IgnoreProjector"="True"
"RenderType"="Transparent"
}
Lighting Off
ZTest LEqual
Blend SrcAlpha OneMinusSrcAlpha
ZWrite On
Cull Off
Offset 1,1
Pass
{
AlphaTest Greater .25
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#include "UnityCG.cginc"
sampler2D _MainTex;
struct appdata
{
float4 vertex : POSITION;
float4 texcoord0 : TEXCOORD0;
};
struct v2f
{
float4 pos : SV_POSITION;
float2 uv : TEXCOORD0;
};
v2f vert (appdata v)
{
v2f o;
o.pos = UnityObjectToClipPos(v.vertex);
o.uv = v.texcoord0.xy;
return o;
}
half4 frag (v2f i) : COLOR
{
return tex2D(_MainTex, i.uv);
}
ENDCG
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 209f4c3496c1b46a3a2f9f0f27be788f
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

Some files were not shown because too many files have changed in this diff Show More