【SplineMesher】新增

main
马远征 2025-02-12 14:17:57 +08:00
parent 57f6527d74
commit f754ef3697
121 changed files with 26385 additions and 0 deletions

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 767e2cfe8029c48b19e55d934572349c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,6 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
[InternetShortcut]
IDList=
URL=https://staggart.xyz/sm-docs
HotKey=0

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: dbdf64c17180cc0439dd1d1ec046f734
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4aa6538e5dcb4efe9d30d1b949d61c9c
timeCreated: 1710943561

View File

@ -0,0 +1,216 @@
using System;
using sc.modeling.splines.runtime;
using UnityEditor;
using UnityEngine;
namespace sc.modeling.splines.editor
{
public class HelpWindow : EditorWindow
{
private static readonly int width = 530;
private static readonly int height = 440;
//[MenuItem("Help/Spline Mesher", false, 0)]
public static void ShowWindow()
{
HelpWindow editorWindow = EditorWindow.GetWindow<HelpWindow>(true, "Help", true);
editorWindow.titleContent = new GUIContent("Help");
//Open somewhat in the center of the screen
editorWindow.position = new Rect((Screen.currentResolution.width / 2f) - (width * 0.5f), (Screen.currentResolution.height / 2f) - (height * 0.5f), (width * 2), height);
//Fixed size
editorWindow.maxSize = new Vector2(width, height);
editorWindow.minSize = new Vector2(width, 200);
//Init
SplineMeshEditor.VersionChecking.CheckForUpdate();
editorWindow.Show();
}
private void OnGUI()
{
EditorGUILayout.Space();
EditorGUILayout.LabelField("<size=24>Spline Mesher</size>", UI.Styles.Header);
GUILayout.Label("by Staggart Creations", UI.Styles.Footer);
//EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
EditorGUILayout.Space();
Color defaultColor = GUI.contentColor;
using (new EditorGUILayout.VerticalScope(UI.Styles.Section))
{
DrawReviewButton();
EditorGUILayout.Space();
//Version
using (new EditorGUILayout.HorizontalScope())
{
EditorGUILayout.LabelField("Asset version");
using (new EditorGUILayout.HorizontalScope(EditorStyles.textField))
{
if (SplineMeshEditor.VersionChecking.UPDATE_AVAILABLE == false)
{
GUI.contentColor = UI.GreenColor;
EditorGUILayout.LabelField(SplineMesher.VERSION + " (Latest)");
GUI.contentColor = defaultColor;
}
else
{
GUI.contentColor = UI.OrangeColor;
EditorGUILayout.LabelField(SplineMesher.VERSION + " (Update available)", EditorStyles.boldLabel);
GUI.contentColor = defaultColor;
}
}
}
using (new EditorGUILayout.VerticalScope())
{
if (SplineMeshEditor.VersionChecking.UPDATE_AVAILABLE)
{
using (new EditorGUILayout.HorizontalScope())
{
//GUILayout.Label("");
GUILayout.Space(EditorGUIUtility.labelWidth + 80f);
if (GUILayout.Button(new GUIContent($" Download v{SplineMeshEditor.VersionChecking.latestVersion}", EditorGUIUtility.IconContent("Asset Store").image)))
{
SplineMeshEditor.OpenInPackageManager();
}
}
}
}
EditorGUILayout.Space();
UI.DrawH2("Documentation");
using (new EditorGUILayout.VerticalScope())
{
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button(new GUIContent("<b><size=12> Documentation</size></b>\n<i><size=11> Usage instructions</size></i>", DocIcon), UI.Styles.Button))
{
Application.OpenURL(SplineMeshEditor.DOC_URL);
}
if (GUILayout.Button(new GUIContent("<b><size=12> FAQ/Troubleshooting</size></b>\n<i><size=11> Common issues and solutions</size></i>", FaqIcon), UI.Styles.Button))
{
Application.OpenURL(SplineMeshEditor.DOC_URL + "?section=troubleshooting-faq-2");
}
EditorGUILayout.EndHorizontal();
}
//EditorGUILayout.HelpBox("If you have any questions, or ran into issues, please get in touch.", MessageType.Info);
EditorGUILayout.Space();
UI.DrawH2("Support");
using (new EditorGUILayout.VerticalScope())
{
EditorGUILayout.HelpBox(" Be sure to consult the documentation, it already covers many common topics", MessageType.Info);
EditorGUILayout.Space();
//Buttons box
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button(new GUIContent("<b><size=12> Discord</size></b>\n<i><size=11> Access support</size></i>", DiscordIcon), UI.Styles.Button))
{
Application.OpenURL(SplineMeshEditor.DISCORD_INVITE_URL);
}
if (GUILayout.Button(new GUIContent("<b><size=12> Forum</size></b>\n<i><size=11> Join the discussion</size></i>", ForumIcon), UI.Styles.Button))
{
Application.OpenURL(SplineMeshEditor.FORUM_URL);
}
if (GUILayout.Button(new GUIContent("<b><size=12> X</size></b>\n<i><size=11> Follow developments</size></i>", TwitterIcon), UI.Styles.Button))
{
Application.OpenURL("https://twitter.com/search?q=staggart%20creations&f=user");
}
EditorGUILayout.EndHorizontal(); //Buttons box
}
}
}
public static void DrawReviewButton()
{
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.FlexibleSpace();
if (GUILayout.Button(new GUIContent("<b><size=12> Write a review</size></b>\n<i> Support further development</i>", ReviewIcon), UI.Styles.Button, GUILayout.Height(45f), GUILayout.Width(240f)))
{
SplineMeshEditor.OpenReviewsPage();
}
GUILayout.FlexibleSpace();
}
}
private static Texture m_ReviewIcon;
private static Texture ReviewIcon
{
get
{
if (m_ReviewIcon == null)
m_ReviewIcon = UI.CreateIcon("iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAD0ElEQVRYCb1XaWxMURT+ph2GqUpF2libNtQyQlClIQSR1JYgokSkPyxVS/1C/KA/CJFUxBaRWEIJIVEk+FGSirYSZUgItYWOEkuVGqP7tL7zdKZ3xps3ozPpSb73zj33nu/cd+57595naruDiIhpemg0ajzxMamG0Ci8o9KolRE1hOgfiP8W8397dDgcoNqN6Ff0AGUZWzCBenVHt76mPnA4GZhO+mI1xLRN2Mf2FtWm6ncPAW1tTLlJtQKdzUCuLw2QlYHMNfnYT/sn/z5P2z94ZzMwnoR2D6nnXtcAd2o2trItk/CRioK/zUhlYJMPe3vD2gPRGxYhJ/cgjtP0S29MJDKQSGKHHrnYqmvRmJiJHKqnpS1SX/T3Lle9DER1dIekrTMaFR8Hy+al2NjQhCgCAlXCzcAgkr0ieqqk/nrlZ9QlL8MS2m+qn5yM08uAXiGSAMnEYGIoMbZdl++8LxFUPtXA2b8vznDgS+I1UUW8IxoIr3i+Agst6cQ2Io6wEb2JiEprK5xcgmdEJYm/ETJBu2RgJ5W1RALRZeKqhzN2DtLkJaz+7kRLl0VuD1T1FSaqe6LLK1BeWALXwqnI6G5GdFdM5MsPNE7MwSMWL4fpQp435KQFU1Da09Lp8uwlMlJqnGgauwoPP1Rru+cq7/fKb/b+xWLMbGqG24ggnL5aF5pT12jBZb+Q984VZbUACkqulmJ2ixut4QTS8/1Vh+bJG2B3fMFX9mcTtTJOzYBWuZiJ2+dvY4EUjUhJfSPc6ethr3Bo5wWppt893FEWHil0cP1SMRZ7BoVz55K2Ts2F/XklfpBH0v5Z5TNPkrKjL4Usq8eS+mmbi/6IEKyHC+Gwv9LSLZuUrL2PmBnASGTWYUlTi/Y+yYngvR6RFCIjCZwfIy+lz5aEGDYDFrpgExiicHVKTUxADzomBXI2OhPK4owK5BiqPbk/Ynhakp1VV4wyMJIeUq/Dkrhe6JZug41l10zAH0YTSAkW+elbOF+81z//qb5DBmg7bbJq8+hGExjtGeR///kbzavz8WzMSjwamYWCvFO4wycLWMJHJMJKjgH+PNI2msA/6y8levdZvImbh7KTN/CG/rKVbdxVgBkxszH3yBXtyCa8PjIuBbE06L4HRhOIV1nO3cLHPvNRuv0kKmk/SiwkSgjsyJIrig5dxvBhK5Bzrcy32sVatW1+uDbK/yIHxwDYRntb6RF8GzoQ9+gnv2LyR2QhgknMrFTkPz6BWuHgX9MTOvzzwxKMRPqXExJ4L+GTEba90p4BpPDcLFBEWvwr1DgmK3av+gf86jED3McCCAAAAABJRU5ErkJggg==");
return m_ReviewIcon;
}
}
private Texture m_DocIcon;
private Texture DocIcon
{
get
{
if (m_DocIcon == null)
m_DocIcon = UI.CreateIcon("iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAEzklEQVRYCbVXTUhjVxR+L8nExtHEn6KtadMZ7DCLQVtShC5MRYrVYkFEQUUQxYWLrkRdjGhVxFIcLUPp1k0XrlwquKiVUFroDJV2OiJjFVRSicaf4kz+TGLmO7fvPl7eezeNZXrhcs89f/fknPPd+yLv7+9LZiOdTjO2LMtmYgOP63N/DocjQ2dtbS1jzzcyN+AMZf0eDutB4/ycIngOfRv0/ZifKj5yWsjIbLyJcy3RaDR5dXVFUZjpMB4OTttstpt5eXkWMJr29vYCWN8SGugEogBeJz2v1/tzJBJ5AfIKUxjF9PT0uz09PXeXlpYCDQ0NZeFw+AT6zAfWrEMUQJSshoeHPV1dXQ/z8/MzC6pxiezsIUudYN1dX18/Gxoa+gpl/fbo6Ohv8Io0qqakDRk0E7ygtPf399+C8KGZAueRPS+R2+3OA/8R9nfKy8v/PDk5ucDeyXXNVlEGmNHc3Nx2MBi8dLlcIj1pZ2cn2tvb666vry+zWCxUpjKPx/N4YGDg/dHR0d9CoVDWIGw8el109EukhYWFIHrga5CnmIXEMxsTExPN4H+u+GK9gv75fXV1tbqpqenJ8fHxc8hN7WV0rZnPp3B2z0xwTV4QJXLAl2txcfEJbN/T24syQJCSUMNYKpWSkFq9nbqntBNcz8/PE8XFxXZcQFY0JWusRCLhQgPLRUVFUjKZdI6Pj/fA8DvVGISotqWk5PP5HqEEQZApTHEU//ghuJ5jlmDexExiSlNTU3fQI15kgkpjJZ52iAKIkNLY2Nittra21dcwtEZEwyEdgOzKeqfUdHz8BT3qJ6/CMNwlIhiG4Vjq7u72wPBL7k27kjyXwfUQCJXFgHlRBtgFMjg4+Mfh4eElaqvqAVaJyspKx+zs7D30SBwIeFZYWGi12+2GEm1vb0f6+vrcjY2NbyAQitgYAI9Q92tu0B4wOkcP3AdJV6sKI9wLdDVvxGKx5PLy8jPQDzDzMZkdVnXMzMx8gs2IwjCkTVSCEAIr29ra+giGP6nedMTFxQX1AfXLY52IbRWIf6CRGQMQZICl8/T0NK5/DamUVqtVLikpsSs3H3U/G4I7hYtNV7W2OimDYW1t7S8oQQiyDBiWlpZaNzY2WgsKClQEZDmcyiUcogAYDNFgt1tbW39Ag9m5B2QsDJqwLjmdTvv8/Lyvvb39ATKjBqPRPQZNZRQOUQ8wGHZ2dr4Ny0mRNQK4gcOrIa8WlFI1/U8wxPfA00AgEEfKDd3Nr1ulD9SDtMTm5mZ4ZGTknebm5goEeH0YrqysEAxH4TQDhppDOK4N3c11ampqPgP9hbI36IlKwGHog+GP3FkO6yVSza5oRZcakD3tSgmMAQhqxxrq4OAgjBctDdhlPRvOJbya6YqKCgdeP7qQRMOACBEKWJfjCv0VJdiFN/pV2aPANYtbsaGqqsojOt2MLwqAwXBycvJ2S0uLH4+hCkMzJ8gA/TJ6ij80k2fjiXqAwbCjo4NgOJ7NAckEZfw3MyY3vGA5Wb1CJdEnWYzOiMfjqVdwlkz/mvBJxiGb4dIGQQZD2XxcV1f3Db71KnHRxM0UrsPDXzf57OyMmtjwgwy41Dim7zpqUgN0NDrXISkAekcSWiN5d3dX3eNXS36/n+3x1aPy/0/iJfpMtnfwrhsgAAAAAElFTkSuQmCC");
return m_DocIcon;
}
}
private Texture m_FaqIcon;
private Texture FaqIcon
{
get
{
if (m_FaqIcon == null)
m_FaqIcon = UI.CreateIcon("iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAFRklEQVRYCa1XXyykVxT/vjEo1qKxSUuxiSUxTUtS3T5oMgm7NmM3EtKkL0v6sjw0G2lVmj548lCLCtG0kRINb4ZGttXSbiTYJbPjT2xaFqNhsBjs6CzKjD/9nc93ufPNmD/Sk5w5/++937nnnntHnJ+fFwgSEhIkyn7MZrMgiqIkHh0dCUFBQcLBwYFAvBKY3/HxsaBSqYSdnR0hNDRUcqOYmZkZp5CRkZFTWaSJ4uLihIWFBWkRPCUvGlCtVhN7BYPdwQK04DXAGGAI8BAL2ASdwwIM8O8Bb6TFrK+vC1FRURAFobe3V6Lsp6KiQmJFcmSwuLgoLYZk4mW4hkm/AH8XE4UxpSe6u7s7igw8gI+ez0BnZ6dTWHl5uSDSFlD6+S9nMry/BH6NiU/2wincu4AMGJGBj+BpPs/bKQOcUwC25mfIOk53IRYZcKAG7iK43d0AUgbcGAz46Otu9BdWdXd3f4bgOuUAIqVeAX9AvqHQOYlra2t7JpPp1crKyj7gKCIiQp2cnHwJeNnJUSGg8D6GyikTygV8DodvFHGSaLPZHIODg+sdHR2Wvr6+LShXgCbgGtAODNfpdBmlpaU3k5KSwiG7AGpiPz09PQmG0wrnt+BNpP2FS5SsmJub287MzHwE8TGQsvSMCpjVJ9dHNKOjo0PR0dERcqgTaW1t/ROKd5iSX0ALBvuEGdxRfN1v0OfU1taSWYvjmYoYahIDQKm7yMf6NvS/kJMSDg8PjzMyMoqh/4Fs4tTUFNHwkJCQLQSpSDgPkIVX2PMfU1JSdPC9xvsNDAzcg9yUlZVF6isOh8PC23m+oaHBVFNT8y50/6qoZQLzvE1OAyQmJoZrNJr7ysnJNjk5+VVBQcH1mJgYAVk4625kVEBOTs4bUN0hNftij1WviHcRNzY29pqbm6koE8mINL/t4sQp4uPjQyFmk4otQMPZ/WKnp6dt+KJRi8WyjMBuCkZtVHsaBHbK0FXyUVG2gJQSvwEXzGp2dvYY+sIEgouANpyMh9ii9z0NhgyRWfqhCiagW80vMBqNm0VFRc8RRCejamlpKRkD94NP9XGgkwVgteR/4GOQ5EYpLCkpmYZgAFahm76HyR+Df01y8OOH1YDVjxi65/eXl5f3EVMlx9WD+j05xbIFUEv1GQICAkStVmvHmyEJ+AEC43wOhmNgYCCbV1DLR5Zuv9u+DoI2G4yWegtbccvXGN5ve3vbATmIdOwU6HkHX3m8/fyqHTbu8PDwJngbySp6MgGf2+32SebgjW5tbdkLCwvH0tLSnmArHo2Pj/tVQ01NTdQzhmkeFb12ZaQHg0/Q1dX1or+/fwGL/hTnXre6uip1NV+CabG4Lbfh+xP5q/E1LO53ME8jIyO9voRQL3R2HwL/kh+v/6Ae2DgeaVlZGR3fMeDf5KjGLUiUwU1shxXP8NMqZQae5ufnx+BFJN2GKOLXgd/x9vP4+vp60+zs7B7sNcxHHBoaYjyjN2JjY+nB4RVwNZuDg4Mj4XjZmzO1bblzfgvfTuYvNjY2Mp6nxejx3+NPhtQmecNF+J6enpXi4mJKfQ/wAT+GWn6Q8DriG6G35ubmNuMNcElp9EeWHx9LiPkV6HJLevvCq5WVlXosJDUsLCzQn4lx1jeqq6vn5YqnGnHba0R8odDW1uY0dnt7uyTX1dXRK4j4ory8vPs4829RRuRT4BRDgtVq3TcYDC/1er0FtUWNhi6oFqBU8aAucJoBZS1gz5TOYVBQ6/0QSCcgAOgOXkL5FEiFTNe1RxAnJugtcQItLbTYM+AyIOBBemb4H7n/AIKWOUx2b5M6AAAAAElFTkSuQmCC");
return m_FaqIcon;
}
}
private Texture m_DiscordIcon;
private Texture DiscordIcon
{
get
{
if (m_DiscordIcon == null)
m_DiscordIcon = UI.CreateIcon("iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAElElEQVRYCb1WbUxbZRS+t7TMQfnoYMIYA8rKwkLWaSTMqH80+7FFs8wM94FfhGXZD0O2337Fjx9qdFmMxsQtatTMMZdoZh1uEswWzOLClH1RGbD2Im3pQCylXytbW59z6VvfW+6FgoyTPL3ve85z3ve85557+oq7900K85XBPz8XLOtb5nSLx6cEnS47xTv97UOpMRuICwmAOc/n6Ru/KtPPfveYwk2nmGU4oQxkIpQBJqYiq0CgA5uKNwp5BTUyljwDLCDKBAWhZ4r5PBdSA3R6vgZo84B/QMg0A/kIcBPwBNAB/AJoyXswuIBOwM5IWjUwVwA7sMAeYAuQS4vdvRPySYMnDuIr+AfTAoDq6DZwC6gDPgFkQQ0M4iv4BpPjQN+0Vvk7WwAXQW1Q0hc+QwZegncqOLaSVg28AsKibU6bFa6o+7j9ZIMDwzM0Z6KWgWIYxxhhMZ8u6UfPrx1Na7EmvTJZ1DLwLjMu9rO86qky9IBXsS5BlvRGZIJ2b9J2Tx7rrQeafX9fKQIEQnoA93RzOtEa8/ayZfcVtQACYckDEHV6sXJt4wvR2+PLAEUAFgRYq5V3x42vhn87t/9af++nkhZncqI/0N3V2tvddaA34L8Z1OKtqthyP2zyvxJfhJu1HPqufui4fPG1v2BvkwaOXzMYjHvN655t4fnhkCvSfrL+d+j6gWM3+77QPf2804Y0G3kejVcUP0AN7FGgkw+gnozpEo9FY8nNj8JGXU2otDxzAV2uEV2OWrQszhvH3Bi4gP2kSP7Nv40htWaFZGcXGKCwkpIPwKxgJSeJRJxGUUDenLs/hKFLBRCLRYl4CuCF/GZIPH4nASVlQVEDZTOYUGTpl2fVWltLAXYqotF/QykNmFRZdq7CWL4AcEHO9lXJXD4D1ANUZWPDW1bP8M+HYTwCPJh8Krj5ptq8zds6DheXbJJgEIE3gA3ArMIH8N/lLc1FFLPE1RVbD0JN0BRsXg3jFU2CioHvA/Rellz4AOT/+/QIgpOOkHuo3Zuun2se8A8G3UOn4TfzXFRXzJ9/Bc2xu5GvYeR1eJs6wevqvD4+2n02x7jm8ZWlDxfmGity9AajkickEpGwN0rNaNTTNTE+dilgrmnCRmIJNqOaSMktz3n6t80hhbiy9JGUAYPtqPaPVlc+Wc4raRwKDNlsbRvewbBOb8itN+aZLWgyhaIuS8QtKR4OuqbCITd9dl7YnY3NIy+THy+R8EjE3nPIOWA/Mgp9F/C6IrIkOb+8atubVTW7dqHwStC75dd0/syOnpHhDuoFHyR51Ezo7sBfy+iaNrF7n58oP+F89LkKwYAUcvR96bZfPuTBdAT4DKA74/SltO1ovsAyMea9QHqSanxaL1ave65pasoft/e8T86twHUyagnXA0wuydYuDZxY7pJ+8IHvBL4HbLyv4kZEgZAgAwKcGK8Qg60Adb5TTJnhMw+8PcAl4A81n/QaELgMCMiAMOmbeZnFO6bbsdp6so5lgR1Ik0gGRuZJlIH/I8kayGgJucAoCKoBVgcs/ZSB+cr0gUTVg6mtlUkNqPktmu5fRzyST440lD0AAAAASUVORK5CYII=");
return m_DiscordIcon;
}
}
private Texture m_ForumIcon;
private Texture ForumIcon
{
get
{
if (m_ForumIcon == null)
m_ForumIcon = UI.CreateIcon("iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAH+0lEQVRYCaVXC2ycxRGe3f//77873yM5O36eH7EDtYNjGpPIgUYUqxSkFlRVNEUVIpC2gqatqoJoUYqoAFG1Ki1UKqpKH0hAyAskRFNCEhJcNyoxyE4dHCdxEjvBju07v+98r/+5nbn4N2fHlwQ68nhud2dnvp2dnd2f/XBnD/jtacilaaUs2wymRyBT1ACqnQafIsDmCsicAWM8O27ZNoCwgQsDxjIyMG8Q3vvj47Du7gey40Nd7+eahdaHtkHbX369oI/97JX2BR2LGgwBrEAAzQjgqwigGQEUIIBy1DMRQAQBJBBAOwJoQwA92B+bvnASKptasqYS8VnwBfzzZhe32UN7zs4PLvpRJWmxzZVVKx/xyVaoLOACYs4Y+FQOtgBI6TahgJFZAybSFoylpXN7nt/2LEZgH9oaX2RvySb7wfaupQYeDZWEf7427CupC0oQ8rnAxHAbJnpFIudEuBtZcskcFGwMTadh2FLgaN/kh+5Q6WYcPHNJI/9/OciSi0dfbPhCw49uKCuAYr8KSd2CWNpYrLOgrWMUiIpQv0Jm4DEKWrqSsAf3exN25w0xzZHlQCFJh/7UeN31W28qlcGyTJhKmQBzq3QUriRThgUZnNJQ7IXkJNyY2bjhCdR/8Epz5KnplDP+i5Yb67euLbIhlcmANRdmcKSjdRVJsUjhpFq3AelbWh94/sebd2HX/nzTZEmbobENgZqmZ+tDEmgm7vW893zTrtyvYZIE3ByKMXolq2++C7XzA7B9pWTta42lHhb0cJhJWXjOr+zgWkbphKiZJNz+rQdvfWHLl+twTv9S82QeKCkLqeK+YtWC2YyNGY4x/4xhX8owpa1bBpCEuUo37eq8ACxD87s90soCFwfdtEAQgGskwWUQDBnQU27YsDoCs0C3DbB1zc1tM5jPJJ5gW5bwRNMcE/9d1T/pSB4wVRWkdAw4lmtZx1JuJD8NnSuA1aocJtVSGIxGhqzkzGxeAH5V1iWJ63iEXByLiVNklppAKA01CNxMgO/UHvDMnIAgm4GAPiIkM4W7Z2dPraEEeNobBhH4EuPHOie06YvnlrJHfbIoCEUmbeNf46nMHeU+BYw8CBgGWldDQk6NibLuJ3il1guuinUgFTYCc7cy7lkuOUXDTkZhWXzAqorvl9bUfFRfdJv1+Dmt+FH0l14MhDXf+xj13bX1mef21vIY2JaF67icTMnP2HivWHPqJ2ZxaY3MVm9hkqKCpSWwNlPuYAWaI4a3Jshu4JIEdnwY5OQx0PoOdrqV5FOo8o6jR5I9+c8TTvuvZeW1378ugMmj5RQiHBUcL6HMFDSe2mZXV9Uwq/IrTJgmCDOzMPkcSzmSK17gsgJapBukvldnf//24L04/K6jknvi/bds+eXf7nvk6W8X8zi4QZ/PBxsBVFzcIVZpHSzYdD+YOlZPYaGN3OmOySUkvh8kNQBS9Aic7W5rR43bHC3ct3nSh7rbj0SiE161+ovNFcsLOD02KK24pUPdwAtQWNfCBC8AhseLEvLaGbcIo8X8K6FIita8svPtxJn+waPIQADoeeMc/tRo37H/1G+8u6mwNHy9ilHQBQdvehjKo3uFP7ye2bRoG/ebIvBZmEBLLpidTUNreFT8al/6rfMzioEVhKoIekIKlVUTkLituP1uzCM8EqAqHKY1oWlygIOVRrD4d9ViQdYuJzs9Dd5lKyAdLbpjZqp3I2ocIOceZP2NgWwQ1APvtW0rrwrf6uMGGO5l0DeRsIeO93/czCL1kp1WsvfU5wQgrAxIWPo8Hg9TGGQfnhR+AsE31TL4d0f3PSvXNj9ZV1cFn6Q8or3nk/E3n/rurj//dNNLZiIaAW3sUvjREHwOptwRGayaehxfsphe6J2cC84JB0DnO6/vQKGGaxvvHLnQJ44ffL0nER0cwL6BvV1Tf1hT3/WiVFPOLOOyekLTr0wYNYb7KtvjcPiDvv7uYRimCQyJnqyzKLNt/Cds2w6jrEKm7bmAfF6VGdv92KrXvvH1lu8YUgMIg55yTu7iz6sQk1V80uPJiR6C7/3m6N9f7hBP48JHnGNo5dyC1Ee3aQSZ7vBJZGExt9j1QfxAIN63fuN6fx1X8CmHFRDPFw7PyTynghanmFMAg4fhdzs/fv+3h8w3yDb6nJWQaAvmt4GcIRMA4vkl4ruY7nb98EmjrUKMNq0OTtQqBV6Q8GhRYpITCmJ2M1HS3QH4rqS4cmsGejvbR7/53KntuzqtfabN/4umR3HIksi5ZVlAeZATBRxbSLhGWidx/B/dmSMfnhwfK4GRWo8+7g8EZS57bZAwMbnQsbik8ILHa5v7BN4HLDnSC6/tP/Huqx3mm6YtncZKNoDIsDLhg4UcO87n8mCh52yL1rGAYwOTdt/2juThM8MzQ5PDQ9bpnrNs6NzpWCxyPnW86/hYbHJYq6xa7hdsGSiqAvr0oNE7bLwViZn0IULRzRLDLcAnuIWhxJuLvvWQ8keCQNCuOBJUbISQl2Ogwy5FLqkOWcH+MStREQD/7ocLH765tfEGoG9N4yJ81HXhIOreiTxPWQBOixw77PQ50kU+kXQx9+PT9KBu6vSiCKB0IUhK5FhJkIcbVtj337POv6FpVdGKlw6N797RkXgGxyhzs/T/RsCx45ibk/O5S+1ggVu6SRIiFNc41hSTzn90ThGTAENP7OTCtefBvImcHxQIJ0L4TRC8VOAQAATwg/ZS3ctRxzr4P35rtWC9T6t3AAAAAElFTkSuQmCC");
return m_ForumIcon;
}
}
private Texture m_TwitterIcon;
private Texture TwitterIcon
{
get
{
if (m_TwitterIcon == null)
m_TwitterIcon = UI.CreateIcon("iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAE5ElEQVRYCZ3VW2iWdRzA8b1LnTs4U9FVzra5bB6W6WblYaQkREE3ItGBJLyNCC8CFSHspi666EZCKUiHnYSioReeJhqIWrrNLRPncu82dWpzraZTc4e+35f3Eba9h2f+4MOz932e9////f7/3/NfJCMjIxM5mIAIgvDvobj7XG9jEA8TjuX42XC+u7gDx88owCeI4kZcD9d/4PUKfsJCPIKxhpNPwXrUowUfYSYyHfA/WN1KlCAXfj8OZj0Jfj8HDehCLHOuYcLVfRkf4yk4nyv5N9qdyA9WqmfhMrWiCZfQh2lwpVy+39GLsGHyn6EMzuHvj2IvuoMlNSsrm4F5uIUvsB2/oDTuca4XYWL2RbpwFefidYzHOdRiF65jVDjRfrg8ZlgOV2QV6mDznMBSOHiqsLhF2IMo/N2nKEIEsQhWIPhsZ3biBbhfrkoTzNYKHLAQ7utZuKSJwgmexgaswnlYgJW7vW57LEYm0M+3dn8WSjAZZn4ZUdi5JmYV3eiADTwEw4lt2mV4B69hIqL4ChYzbOtGJsD9WNM1ch3ASviDP3ENJuOWVMJ7VuK9XphEPt7ENlShDTbdbziMfxE6yniyAZ4D78PBDRv1c7j8nhubMBVWuhYu9z24OjVYB1clYSRageBBB3QbKmAyF9AOq7XquXE+Y6VPYDPmweT+wD78iKSVp0qgjx9ehWeDkxXAxrMxfU1vYjGKUQ4b16tvSjMO4nv4XNJIlYB76kSeEQ4+Gw7eCCsykSwsgfeehA3Zglp8A5vXcZJGqgT8kZPbA4/CiXy1/OwkJuGB5JsxB07k94fwHdymAaSMdAn4Y6t27518PmbB/e2EFXt9Bo/BV/NbnIbJp40wCViZE9l8z6MU41AHT0wbzsm8Z5/4nPe8po0wCThIP64hggqUwS1wJbx2IA9uk/c8zM7D1UsZYRNwEAfzrbDzfSuKYA+4PTarveE2mYAN2QwTM/mkMZYEPAGr8CpsvCmwavfbV80lt3LfmGJ4zxPQbUoaYRPIYoTl+BCVsLvHw8Yz6uFWuE2DWApfTatvRB8SRpgEbLiF8JR7EW5FK9wOE3Ar/kILTKITNqNvhvfcBp/3f8qoSJdAJr+wki14BVZ0EUdQg0KUYjpcheuwH7rgSvmfcyrOwO+GMCzSJWAlG7EGJuPhcgq7cBL+M6qCSebiV/haOpnXFbAh7Y1zGLUVqRKwqg+wDjaUy+j7/TUacAcu/QRYrUm4PU5kQ5rcRLgV9kwtTGRYJEsgn6es+l24pDaXe7wTrkBwyvlv1y1xYA+iJTDxswj6wt8vg8l4bpj4g0iUQA53V+M93EcHfkA1rNwqg3BPrdatuQ23w4Z1O+x+G9UJ34AJ9uMCHiQxMgGX0we3YgHacBA1cBIHSBR9fOlZUIr5mIXLuAR/4/ZUoBBBYgP8PSxMxuwPwAwdcA8cMBPpwtfVsyLoj2P8vRieIc/hONyqn2GisQhWIMKnYmzFSzA7l8pX6yhc5nQxyAOeej1wFa26AM24AYvy+xI4n81qf8Q++HA1HMC9tIrtKIeVhQ0HLsIOdMNJbeCO+NXmtTiTegt5rsA0vI21yEY7mvAlzNJGHEu4Wm1wO2ciPy6Hq03rSvlaz0CTCdyDzeL+eL63YjdOwwrGGk7ShRPwbxvUVbgCVyIavzp29v/0qmv/9is4ZAAAAABJRU5ErkJggg==");
return m_TwitterIcon;
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b6cd74bff5dc11f4eb03d07d3f432707
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 71c38ef734d16bf4fb2c4c5819c1a14a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,110 @@
Shader "Hidden/VisualizeVertexAttributes"
{
Properties
{
[KeywordEnum(Color,UV1,UV3)] _Display("Display",int) = 0
[Space]
[Enum(Red,0,Green,1,Blue,2,Alpha,3,All,4)] _ColorChannel ("Color Channel", Float) = 0
[Enum(X,0,Y,1,Z,2,W,3)] _UVChannel ("UV Channel", Float) = 0
[Space]
[Toggle] _Transparent ("Transparent", Float) = 0
}
SubShader
{
Tags { "RenderType"="Transparent" "RenderQueue"="Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
Cull Off
ZWrite On
//ZTest Always
Pass
{
CGPROGRAM
#pragma vertex Vert
#pragma fragment Frag
#include "UnityCG.cginc"
#pragma multi_compile_local_fragment _DISPLAY_COLOR _DISPLAY_UV1 _DISPLAY_UV3
uint _ColorChannel;
uint _UVChannel;
bool _Transparent;
struct Attributes
{
float4 vertex : POSITION;
float4 color : COLOR;
float4 uv1 : TEXCOORD0;
float4 uv3 : TEXCOORD2;
};
struct Varyings
{
float4 vertex : SV_POSITION;
float4 color : TEXCOORD0;
float4 uv1 : TEXCOORD1;
float4 uv3 : TEXCOORD2;
};
Varyings Vert (Attributes v)
{
Varyings o;
o.vertex = UnityObjectToClipPos(v.vertex);
o.color = v.color;
o.uv1 = v.uv1;
o.uv3 = v.uv3;
return o;
}
float4 RenderVertexColor(Varyings i)
{
float alpha = _Transparent ? i.color.a : 1.0;
//RGB(A)
if(_ColorChannel == 4) return float4(i.color.rgb, alpha);
//Specific channel
float value = i.color[_ColorChannel];
return float4(value.xxx, alpha);
}
float4 RenderUV(float4 uv)
{
//Specific channel
float value = uv[_UVChannel];
return float4(value.xxx, 1.0);
}
float4 Frag(Varyings i) : SV_Target
{
#if _DISPLAY_COLOR
return RenderVertexColor(i);
#endif
#if _DISPLAY_UV1
//float center = 1-saturate(abs(i.uv1.z - 0.5) * 2.0);
//return float4(center.xxx, 1.0);
return RenderUV(i.uv1);
#endif
#if _DISPLAY_UV3
return RenderUV(i.uv3);
#endif
return float4(0, 0, 0, 1.0);
}
ENDCG
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 00b766316eb0eec48b8c8fab8d913228
timeCreated: 1724660452

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 7ef7413427b1c4c42b2a4dd529a306cf
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 8536d422521358c459c76f7fe5650dae
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 1
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: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 64
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 2dc9f2c357d23ad4b89ecaab82c84ce2
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 32
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: b1f47d169e846a34a87bd823665f7fdf
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
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: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,615 @@
// Staggart Creations (http://staggart.xyz)
// Copyright protected under Unity Asset Store EULA
// Copying or referencing source code for the production of new asset store, or public content, is strictly prohibited!
using System;
using System.Collections.Generic;
using sc.modeling.splines.runtime;
using UnityEditor;
using UnityEditor.EditorTools;
using UnityEditor.SceneManagement;
using UnityEngine;
using UnityEngine.SceneManagement;
using Object = UnityEngine.Object;
#if SPLINES
using UnityEngine.Splines;
using UnityEditor.Splines;
#endif
#if FBX_EXPORTER
using UnityEditor.Formats.Fbx.Exporter;
#endif
namespace sc.modeling.splines.editor
{
public static class SplineMeshEditor
{
public const int ASSET_ID = 280289;
public const string DOC_URL = "http://staggart.xyz/sm-docs";
public const string FORUM_URL = "https://forum.unity.com/threads/1565389";
public const string DISCORD_INVITE_URL = "https://discord.gg/GNjEaJc8gw";
private const string MIN_SPLINES_VERSION = "2.4.0";
private static bool STARTUP_PERFORMED
{
get => SessionState.GetBool("SPLINE_MESHER_EDITOR_STARTED", false);
set => SessionState.SetBool("SPLINE_MESHER_EDITOR_STARTED", value);
}
[InitializeOnLoadMethod]
static void Initialize()
{
#if !SPLINES
if (EditorUtility.DisplayDialog("Spline Mesher", $"This asset requires the \"Splines\" (v{MIN_SPLINES_VERSION}) package dependency, which is not installed.", "Install now", "Later"))
{
//Note: Mathematics package is a dependency, so will also be installed
UnityEditor.PackageManager.Client.Add($"com.unity.splines@{MIN_SPLINES_VERSION}");
}
#endif
#if !SM_DEV
if (STARTUP_PERFORMED == false)
#endif
{
VersionChecking.CheckForUpdate();
STARTUP_PERFORMED = true;
}
Lightmapping.bakeStarted += OnLightBakeStart;
#if BAKERY_INCLUDED
ftRenderLightmap.OnPreFullRender += OnBakeryStart;
#endif
}
private static void OnBakeryStart(object sender, EventArgs e)
{
OnLightBakeStart();
}
public static void OpenInPackageManager()
{
Application.OpenURL("com.unity3d.kharma:content/" + ASSET_ID);
}
public static void OpenReviewsPage()
{
Application.OpenURL($"https://assetstore.unity.com/packages/slug/{ASSET_ID}?aid=1011l7Uk8&pubref=smeditor#reviews");
}
private static void OnLightBakeStart()
{
if (Preferences.AutoGeneratedLightmapUV == false) return;
SplineMesher[] splineMeshers = Object.FindObjectsByType<SplineMesher>(FindObjectsSortMode.None);
List<Mesh> meshes = new List<Mesh>();
int count = 0;
System.Diagnostics.Stopwatch lightmapUVUnwrapTimer = new System.Diagnostics.Stopwatch();
//Find the spline meshes that still require lightmap UV's
foreach (SplineMesher splineMesher in splineMeshers)
{
lightmapUVUnwrapTimer.Start();
if (RequiresLightmapUV(splineMesher))
{
//Debug.Log($"{splineMesher.name} requires new lightmap UV's");
GenerateLightmapUV(splineMesher);
count++;
}
lightmapUVUnwrapTimer.Stop();
}
if (count > 0)
{
Debug.Log($"[Spline Mesher] Lightmap UV created for {count} spline meshes (Duration: {lightmapUVUnwrapTimer.ElapsedMilliseconds}ms)");
}
}
public static bool RequiresLightmapUV(SplineMesher instance)
{
if (!instance.outputObject) return false;
MeshFilter mf = instance.outputObject.GetComponent<MeshFilter>();
//Improper set up
if (mf == null) return false;
StaticEditorFlags staticFlags = GameObjectUtility.GetStaticEditorFlags(mf.gameObject);
//Mesh renderer marked as static
if (staticFlags.HasFlag(StaticEditorFlags.ContributeGI))
{
Mesh mesh = mf.sharedMesh;
if (mesh == null) return false;
//Conditions that indicate the mesh has no lightmap UV's
//Note that rebuilding the spline mesh clears the UV2 channel, automatically marking it as 'dirty' again.
if (mesh.uv2 == null || mesh.uv2.Length == 0)
{
return true;
}
}
return false;
}
public static void GenerateLightmapUV(SplineMesher instance)
{
MeshFilter mf = instance.outputObject.GetComponent<MeshFilter>();
if (!mf) return;
Mesh mesh = mf.sharedMesh;
if(mesh == null) return;
UnwrapParam.SetDefaults(out var unwrapSettings);
unwrapSettings.hardAngle = instance.settings.mesh.lightmapUVAngleThreshold;
unwrapSettings.packMargin *= Mathf.Max(0.01f, instance.settings.mesh.lightmapUVMarginMultiplier);
#if UNITY_2022_1_OR_NEWER
if (Unwrapping.GenerateSecondaryUVSet(mesh, unwrapSettings) == false)
{
throw new Exception($"Lightmap UV generation for mesh \"{mesh.name}\" failed.");
}
#else
Unwrapping.GenerateSecondaryUVSet(mesh, unwrapSettings);
#endif
}
#region Editor menu additions
#if SPLINES
[MenuItem("CONTEXT/MeshFilter/Convert to Spline", true)]
private static bool AddMesherToMeshFilterValidation(MenuCommand cmd)
{
MeshFilter meshFilter = (MeshFilter)cmd.context;
return !meshFilter.GetComponent<SplineMesher>();
}
[MenuItem("CONTEXT/MeshFilter/Convert to Spline")]
private static void AddMesherToMeshFilter(MenuCommand cmd)
{
MeshFilter meshFilter = (MeshFilter)cmd.context;
if (meshFilter.sharedMesh == null)
{
throw new Exception("Mesh Filter component requires a mesh to convert");
}
if (EditorUtility.IsPersistent(meshFilter.sharedMesh) == false)
{
if (EditorUtility.DisplayDialog("Spline Mesher", "Mesh Filter uses a procedural mesh, it could have already been created from a spline.", "Continue", "Cancel") == false)
{
return;
}
}
SplineMesher component = meshFilter.gameObject.AddComponent<SplineMesher>();
Undo.RegisterCreatedObjectUndo(component, "Created Spline Mesher");
component.outputObject = meshFilter.gameObject;
component.sourceMesh = meshFilter.sharedMesh;
if (EditorUtility.DisplayDialog("Convert Mesh to Spline", "Create with a new spline?", "Yes", "No"))
{
SplineContainer splineContainer = meshFilter.gameObject.AddComponent<SplineContainer>();
Undo.RegisterCreatedObjectUndo(splineContainer, "Created Spline Mesher");
float meshLength = (meshFilter.sharedMesh.bounds.min.z - meshFilter.sharedMesh.bounds.max.z) * 2f;
//Create new spline
{
//One knot every 5 units
int knots = Mathf.RoundToInt(meshLength / 5f);
knots = Math.Max(2, knots);
Spline spline = new Spline(knots, false);
for (int i = 0; i <= knots; i++)
{
float t = (float)i / (float)knots;
BezierKnot knot = new BezierKnot();
knot.Position = new Vector3(0, 0f, (t * meshLength) - (meshLength * 0.5f));
spline.Add(knot, TangentMode.Linear);
}
//Automatically recalculate tangents
spline.SetTangentMode(new SplineRange(0, spline.Count), TangentMode.AutoSmooth);
//Spline container will be instantiated with a default spline, so overwrite it
splineContainer.Spline = spline;
}
component.splineContainer = splineContainer;
//Activate the spline editor
EditorApplication.delayCall += ToolManager.SetActiveContext<SplineToolContext>;
}
EditorUtility.SetDirty(meshFilter);
component.Rebuild();
if (Application.isPlaying == false) EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene());
}
[MenuItem("GameObject/3D Object/Spline Mesh", false, 0)]
public static GameObject CreateSplineMesh()
{
Transform parent = Selection.activeGameObject ? Selection.activeGameObject.transform : null;
GameObject gameObject = new GameObject(GameObjectUtility.GetUniqueNameForSibling(parent, "Spline Mesh"));
Undo.RegisterCreatedObjectUndo(gameObject, "Created Spline Mesh Object");
SplineMesher component = gameObject.AddComponent<SplineMesher>();
SplineContainer splineContainer = gameObject.AddComponent<SplineContainer>();
splineContainer.Splines = null;
splineContainer.AddSpline(CreateDefaultSpline());
component.splineContainer = splineContainer;
component.outputObject = gameObject;
SetupSplineRenderer(gameObject);
component.Rebuild();
if (parent) gameObject.transform.parent = parent;
Selection.activeGameObject = gameObject;
if (!parent) EditorApplication.ExecuteMenuItem("GameObject/Move To View");
else gameObject.transform.localPosition = Vector3.zero;
return gameObject;
}
public static SplineContainer AddSplineContainer(GameObject target)
{
if (target == null)
{
throw new Exception("Cannot add a Spline Container component to a null GameObject");
}
SplineContainer splineContainer = target.AddComponent<SplineContainer>();
splineContainer.AddSpline(CreateDefaultSpline());
EditorUtility.SetDirty(target);
return splineContainer;
}
private static Spline CreateDefaultSpline()
{
int knots = 5;
float amplitude = 2f;
float length = 15f;
Spline spline = new Spline(knots, false);
for (int i = 0; i < knots; i++)
{
float t = (float)i / (float)knots;
BezierKnot knot = new BezierKnot();
knot.Position = new Vector3(Mathf.Sin(t * length) * amplitude, 0f, (t * length) - (length * 0.5f));
spline.Add(knot, TangentMode.Linear);
}
//Automatically recalculate tangents
spline.SetTangentMode(new SplineRange(0, spline.Count), TangentMode.AutoSmooth);
return spline;
}
[MenuItem("CONTEXT/SplineContainer/Add Spline Mesher", true, 3000)]
private static bool AddMesherToSplineValidation(MenuCommand cmd)
{
SplineContainer splineContainer = (SplineContainer)cmd.context;
return !splineContainer.GetComponent<SplineMesher>();
}
[MenuItem("CONTEXT/SplineContainer/Add Spline Mesher", false, 3000)]
private static void AddMesherToSpline(MenuCommand cmd)
{
SplineContainer splineContainer = (SplineContainer)cmd.context;
SplineMesher component = splineContainer.GetComponent<SplineMesher>();
if (component) return;
component = splineContainer.gameObject.AddComponent<SplineMesher>();
Undo.RegisterCreatedObjectUndo(component, $"Add Spline Mesher to {splineContainer.name}");
component.splineContainer = splineContainer;
component.outputObject = component.gameObject;
SetupSplineRenderer(component.outputObject);
component.Rebuild();
EditorUtility.SetDirty(splineContainer.gameObject);
}
#endif
/// <summary>
/// Adds a Mesh Filter and Mesh Renderer (with default material) if missing on the provided Game Object.
/// </summary>
/// <param name="targetObject"></param>
public static void SetupSplineRenderer(GameObject targetObject)
{
MeshFilter meshFilter = targetObject.GetComponent<MeshFilter>();
if (meshFilter == null)
{
meshFilter = targetObject.AddComponent<MeshFilter>();
Undo.RegisterCreatedObjectUndo(meshFilter, $"Setup Spline Mesher on {targetObject.name}");
}
MeshRenderer meshRenderer = targetObject.GetComponent<MeshRenderer>();
if (meshRenderer == null)
{
meshRenderer = targetObject.AddComponent<MeshRenderer>();
Undo.RegisterCreatedObjectUndo(meshRenderer, $"Setup Spline Mesher on {targetObject.name}");
meshRenderer.sharedMaterial = UnityEngine.Rendering.GraphicsSettings.defaultRenderPipeline
? UnityEngine.Rendering.GraphicsSettings.defaultRenderPipeline.defaultMaterial :
AssetDatabase.GetBuiltinExtraResource<Material>("Default-Material.mat");
}
}
public static int RebuildAllInstances()
{
SplineMesher[] splineMeshers = Object.FindObjectsByType<SplineMesher>(FindObjectsSortMode.None);
int count = 0;
for (int i = 0; i < splineMeshers.Length; i++)
{
count++;
splineMeshers[i].Rebuild();
}
return count;
}
public static int RebuildAllInstancesUsingMesh(Mesh sourceMesh)
{
SplineMesher[] splineMeshers = Object.FindObjectsByType<SplineMesher>(FindObjectsSortMode.None);
int count = 0;
for (int i = 0; i < splineMeshers.Length; i++)
{
if(splineMeshers[i].sourceMesh == null) continue;
if (splineMeshers[i].sourceMesh == sourceMesh)
{
splineMeshers[i].Rebuild();
count++;
}
}
Debug.Log($"Rebuilt {count} Spline Mesher components using the \"{sourceMesh.name}\" mesh.");
return count;
}
#endregion
public static class FBX
{
/// <summary>
/// Export any sort of meshes contained in the object, and load+reference them back to it
/// </summary>
/// <param name="mesher"></param>
/// <param name="filePath"></param>
/// <exception cref="Exception">Empty file path, or missing the FBX extension</exception>
public static void SaveToFileAndReference(SplineMesher mesher, string filePath)
{
#if FBX_EXPORTER
if (filePath == string.Empty)
{
throw new Exception("Failed to save mesh(es) to an FBX file, file path is empty");
}
if (filePath.EndsWith(".fbx") == false)
{
throw new Exception("Failed to save mesh(es) to an FBX file, file path must end with \".fbx\"");
}
GameObject gameObject = mesher.gameObject;
MeshCollider collider = mesher.GetComponent<MeshCollider>();
GameObject colliderObj = new GameObject();
bool hasCollision = collider;
if (hasCollision)
{
//In order for the exporter to also export the collision mesh, it needs to be on a separate object
collider.transform.parent = mesher.transform;
collider.transform.localPosition = Vector3.zero;
MeshCollider tempCollider = colliderObj.AddComponent<MeshCollider>();
tempCollider.sharedMesh = collider.sharedMesh;
MeshFilter tempMF = colliderObj.AddComponent<MeshFilter>();
tempMF.sharedMesh = collider.sharedMesh;
}
//Export
ModelExporter.ExportObject(filePath, mesher);
//Delete temp collider
if (hasCollision)
{
Object.DestroyImmediate(colliderObj);
}
//Import
AssetDatabase.ImportAsset(filePath, ImportAssetOptions.ForceSynchronousImport);
//Loading meshes and assigning them to MeshFilters
Object[] subAssets = AssetDatabase.LoadAllAssetsAtPath(filePath);
MeshFilter meshFilter = mesher.GetComponent<MeshFilter>();
if (meshFilter)
{
for (int i = 1; i < subAssets.Length; i++) //Skip the first, as it is the parent
{
if (subAssets[i] is Mesh)
{
if (hasCollision && subAssets[i].name.EndsWith("Collider"))
{
collider.sharedMesh = subAssets[i] as Mesh;
continue;
}
meshFilter.sharedMesh = subAssets[i] as Mesh;
}
}
}
#endif
}
}
internal static class VersionChecking
{
public static bool UPDATE_AVAILABLE
{
get => SessionState.GetBool("SPLINE_MESHER_UPDATE_AVAILABLE", false);
set => SessionState.SetBool("SPLINE_MESHER_UPDATE_AVAILABLE", value);
}
public static string latestVersion = SplineMesher.VERSION;
private static string apiResult;
public static void CheckForUpdate()
{
//Default, in case of a fail
UPDATE_AVAILABLE = false;
//Offline
if (Application.internetReachability == NetworkReachability.NotReachable) return;
//Debug.Log("Checking for version update");
var url = $"https://api.assetstore.unity3d.com/package/latest-version/{ASSET_ID}";
using (System.Net.WebClient webClient = new System.Net.WebClient())
{
webClient.DownloadStringCompleted += OnRetrievedAPIContent;
webClient.DownloadStringAsync(new System.Uri(url), apiResult);
}
}
private class AssetStoreItem
{
public string name;
public string version;
}
private static void OnRetrievedAPIContent(object sender, System.Net.DownloadStringCompletedEventArgs e)
{
if (e.Error == null && !e.Cancelled)
{
string result = e.Result;
AssetStoreItem asset = (AssetStoreItem)JsonUtility.FromJson(result, typeof(AssetStoreItem));
latestVersion = asset.version;
Version remoteVersion = new Version(asset.version);
Version installedVersion = new Version(SplineMesher.VERSION);
UPDATE_AVAILABLE = remoteVersion > installedVersion;
if (UPDATE_AVAILABLE)
{
//Debug.Log($"[{asset.name} v{installedVersion}] New version ({asset.version}) is available");
}
}
}
}
public static class Preferences
{
public const string PreferencesPath = "Preferences/Splines/Spline Mesher";
public enum SectionStyle
{
Accordion,
Foldouts
}
public static SectionStyle SectionStyleMode
{
get => (SectionStyle)EditorPrefs.GetInt(PlayerSettings.productName + "_SM_SectionStyle", (int)SectionStyle.Accordion);
set => EditorPrefs.SetInt(PlayerSettings.productName + "_SM_SectionStyle", (int)value);
}
public static bool RebuildEveryFrame
{
get => EditorPrefs.GetBool(PlayerSettings.productName + "_SM_RebuildEveryFrame", false);
set => EditorPrefs.SetBool(PlayerSettings.productName + "_SM_RebuildEveryFrame", value);
}
public static bool AutoGeneratedLightmapUV
{
get => EditorPrefs.GetBool(PlayerSettings.productName + "_SM_AutoGeneratedLightmapUV", true);
set => EditorPrefs.SetBool(PlayerSettings.productName + "_SM_AutoGeneratedLightmapUV", value);
}
[SettingsProvider]
public static SettingsProvider PreferencesProvider()
{
var provider = new SettingsProvider(PreferencesPath, SettingsScope.User)
{
label = $"Spline Mesher",
guiHandler = (searchContent) =>
{
EditorGUILayout.LabelField($"v{SplineMesher.VERSION}", EditorStyles.miniLabel);
EditorGUILayout.Space();
SectionStyleMode = (SectionStyle)EditorGUILayout.EnumPopup("Inspector section style", SectionStyleMode, GUILayout.Width(EditorGUIUtility.labelWidth + 180f));
EditorGUILayout.HelpBox("• Accordion: Allows one section to expand at a time\n" +
"• Foldouts: Manually expand/collapse sections", MessageType.Info);
EditorGUILayout.Space();
RebuildEveryFrame = EditorGUILayout.Toggle("Rebuild every frame", RebuildEveryFrame);
EditorGUILayout.HelpBox("When disabled, the spline mesh is rebuild at a lower frame rate when changing parameters in the Spline Mesh inspector. This yields better editor performance." +
"\n\nWhen enabled, rebuilding occurs every time the UI repaints (much smoother)", MessageType.Info);
EditorGUILayout.Space();
AutoGeneratedLightmapUV = EditorGUILayout.Toggle("Lightmap UV generation", AutoGeneratedLightmapUV);
EditorGUILayout.HelpBox("When light baking starts, check all (static) Spline Mesher components in the scene and auto-generate lightmap UVs for the created meshes.", MessageType.Info);
EditorGUILayout.Space();
HelpWindow.DrawReviewButton();
EditorGUILayout.Space();
using (new EditorGUILayout.HorizontalScope())
{
GUILayout.FlexibleSpace();
if (GUILayout.Button("Rebuild all instances in scene"))
{
int count = RebuildAllInstances();
Debug.Log($"Rebuilt {count} Spline Mesher component instances.");
}
}
},
keywords = new HashSet<string>(new[] { "Spline", "Spline Mesh" })
};
return provider;
}
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: ee917b9a51934525b6af1e4deada85c9
timeCreated: 1710947703

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b483ade1395e4b1bae5967f594f722d1
timeCreated: 1710944347

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 05e899c6698442fca48e16f333e18f13
timeCreated: 1724678069

View File

@ -0,0 +1,237 @@
// Staggart Creations (http://staggart.xyz)
// Copyright protected under Unity Asset Store EULA
// Copying or referencing source code for the production of new asset store, or public content, is strictly prohibited!
using sc.modeling.splines.runtime;
using UnityEditor;
using UnityEditor.EditorTools;
using UnityEngine.UIElements;
#if MATHEMATICS
using Unity.Mathematics;
using UnityEditor.Overlays;
using UnityEngine;
#endif
#if SPLINES
using UnityEngine.Splines;
using UnityEditor.Splines;
#endif
namespace sc.modeling.splines.editor
{
[EditorTool("Spline Mesh Roll", typeof(SplineMesher))]
sealed class RollTool : EditorTool
{
#if SPLINES
GUIContent m_IconContent;
public override GUIContent toolbarIcon => m_IconContent;
public static Texture2D LoadIcon()
{
return AssetDatabase.LoadAssetAtPath<Texture2D>($"{SplineMesher.kPackageRoot}/Editor/Resources/spline-mesher-roll-icon-64px.psd");
}
void OnEnable()
{
m_IconContent = new GUIContent
{
image = LoadIcon(),
tooltip = "Adjust the mesh's roll along the spline"
};
}
bool GetTargets(out SplineMesher splineMesher, out SplineContainer spline)
{
splineMesher = target as SplineMesher;
if (splineMesher != null)
{
spline = splineMesher.splineContainer as SplineContainer;
return spline != null && spline.Spline != null;
}
spline = null;
return false;
}
public override void OnToolGUI(EditorWindow window)
{
foreach (var m_target in targets)
{
var modeler = m_target as SplineMesher;
if (modeler == null || modeler.splineContainer == null)
return;
base.OnToolGUI(window);
Handles.color = Color.yellow;
var splines = modeler.splineContainer.Splines;
for (var i = 0; i < splines.Count; i++)
{
if (i < modeler.rollData.Count)
{
NativeSpline nativeSpline = new NativeSpline(splines[i], modeler.splineContainer.transform.localToWorldMatrix);
Undo.RecordObject(modeler, "Modifying Mesh Roll");
int changedIndex = DrawIndexPointHandles(nativeSpline, modeler.rollData[i]);
if (changedIndex >= 0)
{
modeler.Rebuild();
modeler.UpdateCaps();
}
changedIndex = DrawDataPointHandles(nativeSpline, modeler.rollData[i]);
if (changedIndex >= 0)
{
modeler.Rebuild();
modeler.UpdateCaps();
}
if (GUI.changed)
{
}
}
}
}
}
int DrawIndexPointHandles(NativeSpline spline, SplineData<float> splineData)
{
int anchorId = GUIUtility.GetControlID(FocusType.Passive);
spline.DataPointHandles(splineData);
int nearestIndex = ControlIdToIndex(anchorId, HandleUtility.nearestControl, splineData.Count);
var hotIndex = ControlIdToIndex(anchorId, GUIUtility.hotControl, splineData.Count);
var tooltipIndex = hotIndex >= 0 ? hotIndex : nearestIndex;
if (tooltipIndex >= 0)
DrawTooltip(spline, splineData, tooltipIndex);
// Return the index that's being changed, or -1
return hotIndex;
// Local function
static int ControlIdToIndex(int anchorId, int controlId, int targetCount)
{
int index = controlId - anchorId - 2;
return index >= 0 && index < targetCount ? index : -1;
}
}
// inverse pre-calculation optimization
readonly Quaternion m_DefaultHandleOrientation = Quaternion.Euler(270, 0, 0);
readonly Quaternion m_DefaultHandleOrientationInverse = Quaternion.Euler(90, 0, 0);
int DrawDataPointHandles(NativeSpline spline, SplineData<float> splineData)
{
int changed = -1;
int tooltipIndex = -1;
for (var i = 0; i < splineData.Count; ++i)
{
var dataPoint = splineData[i];
var t = SplineUtility.GetNormalizedInterpolation(spline, dataPoint.Index, splineData.PathIndexUnit);
spline.Evaluate(t, out var position, out var tangent, out var up);
var id = GUIUtility.GetControlID(FocusType.Passive);
if (DrawDataPoint(id, position, tangent, up, dataPoint.Value, out var result))
{
dataPoint.Value = result;
splineData.SetDataPoint(i, dataPoint);
changed = i;
}
if (tooltipIndex < 0 && id == HandleUtility.nearestControl || id == GUIUtility.hotControl)
tooltipIndex = i;
}
if (tooltipIndex >= 0)
DrawTooltip(spline, splineData, tooltipIndex);
return changed;
// local function
bool DrawDataPoint(int controlID, Vector3 position, Vector3 tangent, Vector3 up, float rollData, out float result)
{
result = 0;
if (tangent == Vector3.zero)
return false;
var drawMatrix = Handles.matrix * Matrix4x4.TRS(position, Quaternion.LookRotation(tangent, up), Vector3.one);
using (new Handles.DrawingScope(drawMatrix)) // use draw matrix, so we work in local space
{
var localRot = Quaternion.Euler(0, rollData, 0);
var globalRot = m_DefaultHandleOrientation * localRot;
var handleSize = HandleUtility.GetHandleSize(Vector3.zero) / 2f;
if (Event.current.type == EventType.Repaint)
Handles.ArrowHandleCap(-1, Vector3.zero, globalRot, handleSize, EventType.Repaint);
var newGlobalRot = Handles.Disc(controlID, globalRot, Vector3.zero, Vector3.forward, handleSize, false, 0);
if (GUIUtility.hotControl == controlID)
{
// Handles.Disc returns roll values in the [0, 360] range. Therefore, it works only in fixed ranges
// For example, within any of these ..., [-720, -360], [-360, 0], [0, 360], [360, 720], ...
// But we want to be able to rotate through these ranges, and not get stuck. We can detect when to
// move between ranges: when the roll delta is big. e.g. 359 -> 1 (358), instead of 1 -> 2 (1)
var newLocalRot = m_DefaultHandleOrientationInverse * newGlobalRot;
var deltaRoll = newLocalRot.eulerAngles.y - localRot.eulerAngles.y;
if (deltaRoll > 180)
deltaRoll -= 360; // Roll down one range
else if (deltaRoll < -180)
deltaRoll += 360; // Roll up one range
rollData += deltaRoll;
result = rollData;
return true;
}
}
return false;
}
}
void DrawTooltip(NativeSpline spline, SplineData<float> splineData, int index)
{
var dataPoint = splineData[index];
var text = $"Index: {dataPoint.Index}\nRoll: {dataPoint.Value}\u00b0";
var t = SplineUtility.GetNormalizedInterpolation(spline, dataPoint.Index, splineData.PathIndexUnit);
spline.Evaluate(t, out var position, out _, out _);
DrawLabel(position, text);
}
public static void DrawLabel(Vector3 position, string text)
{
var labelOffset = HandleUtility.GetHandleSize(position) / 1.5f;
Handles.Label(position + new Vector3(0, -labelOffset, 0), text, Label);
}
private static GUIStyle _Label;
public static GUIStyle Label
{
get
{
if (_Label == null)
{
_Label = new GUIStyle(EditorStyles.largeLabel)
{
alignment = TextAnchor.MiddleLeft,
fontSize = 12,
fontStyle = FontStyle.Bold,
padding = new RectOffset()
{
left = 5,
right = 0,
top = 0,
bottom = 0
}
};
_Label.normal.textColor = Color.black; // Set the text color to black
_Label.normal.background = Texture2D.whiteTexture;
}
return _Label;
}
}
#endif
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b49a036971514ac0ab0701f1b7829e76
timeCreated: 1724515040

View File

@ -0,0 +1,293 @@
// Staggart Creations (http://staggart.xyz)
// Copyright protected under Unity Asset Store EULA
// Copying or referencing source code for the production of new asset store, or public content, is strictly prohibited!
using sc.modeling.splines.runtime;
using UnityEditor;
using UnityEditor.EditorTools;
using UnityEngine.UIElements;
#if MATHEMATICS
using Unity.Mathematics;
using UnityEditor.Overlays;
using UnityEngine;
#endif
#if SPLINES
using UnityEngine.Splines;
using UnityEditor.Splines;
#endif
namespace sc.modeling.splines.editor
{
[EditorTool("Spline Mesh Scale", typeof(SplineMesher))]
public class ScaleTool : EditorTool
{
#if SPLINES && MATHEMATICS
private GUIContent m_IconContent;
public override GUIContent toolbarIcon => m_IconContent;
private IDrawSelectedHandles drawSelectedHandlesImplementation;
protected const float k_MinSliderSize = 1.35f;
private const float k_HandleSize = 0.1f;
private bool m_DisableHandles = false;
private ScaleToolUI ui;
public static Texture2D LoadIcon()
{
return AssetDatabase.LoadAssetAtPath<Texture2D>($"{SplineMesher.kPackageRoot}/Editor/Resources/spline-mesher-scale-icon-64px.psd");
}
public static bool UniformScaling
{
get => EditorPrefs.GetBool("SM_SCALE_UNIFORM", true);
set => EditorPrefs.SetBool("SM_SCALE_UNIFORM", value);
}
void OnEnable()
{
name = "Spline Mesh Scale";
m_IconContent = new GUIContent()
{
image = LoadIcon(),
text = "Spline Mesh Scale Tool",
tooltip = "Adjust the scale of the created spline mesh."
};
}
public override void OnActivated()
{
#if UNITY_2022_1_OR_NEWER
SceneView.AddOverlayToActiveView(ui = new ScaleToolUI());
#endif
ScaleToolUI.Show = true;
foreach (var m_target in targets)
{
SplineMesher modeler = m_target as SplineMesher;
if (modeler == null || modeler.splineContainer == null)
return;
modeler.ValidateData();
for (int i = 0; i < modeler.scaleData.Count; i++)
{
for (int j = 0; j < modeler.scaleData[i].Count; j++)
{
if (math.length(modeler.scaleData[i][j].Value) < 0.01f)
{
Debug.LogError($"{modeler.name} has a Scale data point for Spline #{i} with a value of (0,0,0). This creates invalid geometry. It has been reset to (1,1,1)");
DataPoint<float3> p = modeler.scaleData[i][j];
p.Value = new float3(1f);
modeler.scaleData[i][j] = p;
EditorUtility.SetDirty(modeler);
}
}
}
}
}
public override void OnWillBeDeactivated()
{
#if UNITY_2022_1_OR_NEWER
SceneView.RemoveOverlayFromActiveView(ui);
#endif
ScaleToolUI.Show = false;
}
public override void OnToolGUI(EditorWindow window)
{
foreach (var m_target in targets)
{
var modeler = m_target as SplineMesher;
if (modeler == null || modeler.splineContainer == null)
return;
base.OnToolGUI(window);
Handles.color = Color.yellow;
m_DisableHandles = false;
var splines = modeler.splineContainer.Splines;
for (var i = 0; i < splines.Count; i++)
{
if (i < modeler.scaleData.Count)
{
NativeSpline nativeSpline = new NativeSpline(splines[i], modeler.splineContainer.transform.localToWorldMatrix);
Undo.RecordObject(modeler, "Modifying Mesh Scale");
// User defined handles to manipulate width
DrawDataPoints(nativeSpline, modeler.scaleData[i]);
// Using the out-of the box behaviour to manipulate indexes
nativeSpline.DataPointHandles(modeler.scaleData[i], true, i);
if (GUI.changed)
{
modeler.Rebuild();
modeler.UpdateCaps();
}
}
}
}
}
private bool DrawDataPoints(ISpline spline, SplineData<float3> splineData)
{
SplineMesher modeler = target as SplineMesher;
var inUse = false;
for (int dataFrameIndex = 0; dataFrameIndex < splineData.Count; dataFrameIndex++)
{
var dataPoint = splineData[dataFrameIndex];
var normalizedT = SplineUtility.GetNormalizedInterpolation(spline, dataPoint.Index, splineData.PathIndexUnit);
spline.Evaluate(normalizedT, out var position, out var tangent, out var up);
if (DrawDataPoint(position, tangent, up, dataPoint.Value, out var result))
{
dataPoint.Value = result;
splineData[dataFrameIndex] = dataPoint;
inUse = true;
modeler.Rebuild();
}
}
return inUse;
}
private bool DrawDataPoint(Vector3 position, Vector3 tangent, Vector3 up, float3 inValue, out float3 outValue)
{
int id = m_DisableHandles ? -1 : GUIUtility.GetControlID(FocusType.Passive);
int id2 = m_DisableHandles ? -1 : GUIUtility.GetControlID(FocusType.Passive);
outValue = inValue;
if (tangent == Vector3.zero)
return false;
if (Event.current.type == EventType.MouseUp
&& Event.current.button != 0
&& (GUIUtility.hotControl == id || GUIUtility.hotControl == id2))
{
Event.current.Use();
return false;
}
var handleColor = Handles.color;
if ((GUIUtility.hotControl == id || GUIUtility.hotControl == id2))
handleColor = Handles.selectedColor;
else if (GUIUtility.hotControl == 0 && (HandleUtility.nearestControl == id || HandleUtility.nearestControl == id2))
handleColor = Handles.preselectionColor;
var splineDataTarget = target as SplineMesher;
up = math.up();
Vector3 right = math.normalize(math.cross(tangent, up));
float handleScale = HandleUtility.GetHandleSize(position);
/*
Vector3 scale = inValue;
quaternion rotation = quaternion.LookRotationSafe(tangent, up);
using (new Handles.DrawingScope(handleColor))
{
scale = Handles.ScaleHandle(inValue, position, rotation, k_HandleSize * handleScale * 10);
}
if (GUIUtility.hotControl == id && math.abs(scale.magnitude - math.length(inValue)) > 0f)
{
outValue = scale / handleScale;
return true;
}
*/
Vector3 x = position - (right * inValue.x * handleScale);
Vector3 y = position + (up * inValue.y * handleScale);
Vector3 width, height;
using (new Handles.DrawingScope(handleColor))
{
Handles.color = Color.red;
if (Event.current.type == EventType.Repaint)
{
Handles.DrawAAPolyLine(Texture2D.whiteTexture, 3f, new []{position, x});
}
width = Handles.Slider(id, x, right, k_HandleSize * handleScale, CustomHandleCap, 0);
Handles.color = Color.green;
if (Event.current.type == EventType.Repaint)
{
Handles.DrawAAPolyLine(Texture2D.whiteTexture, 3f, new []{position, y});
}
height = Handles.Slider(id2, y, up, k_HandleSize * handleScale, CustomHandleCap, 0);
}
if (GUIUtility.hotControl == id && math.abs(width.x - x.x) > 0f)
{
outValue.x = math.distance(width, position) / handleScale;
if (UniformScaling) outValue.y = outValue.x;
return true;
}
if (GUIUtility.hotControl == id2 && math.abs(height.y - y.y) > 0f)
{
outValue.y = math.distance(height, position) / handleScale;
if (UniformScaling) outValue.x = outValue.y;
return true;
}
return false;
}
private void CustomHandleCap(int controlID, Vector3 position, Quaternion rotation, float size, EventType eventType)
{
if (m_DisableHandles) // If disabled, do nothing unless it's a repaint event
{
if (Event.current.type == EventType.Repaint)
Handles.CubeHandleCap(controlID, position, rotation, size, eventType);
}
else
Handles.CubeHandleCap(controlID, position, rotation, size, eventType);
}
#endif
}
#if SPLINES && MATHEMATICS
#if UNITY_2022_1_OR_NEWER
[Overlay(defaultDisplay = true)]
#else
[Overlay(typeof(SceneView), "Spline Mesh Scale Tool")]
#endif
public class ScaleToolUI : Overlay, ITransientOverlay
{
public static bool Show;
public bool visible => Show;
public override VisualElement CreatePanelContent()
{
var root = new VisualElement();
Toggle uniformScaling = new Toggle("Uniform scaling")
{
value = ScaleTool.UniformScaling,
tooltip = "Use any of the handles to uniformly scale the data point"
};
uniformScaling.RegisterValueChangedCallback(evt => { ScaleTool.UniformScaling = evt.newValue; });
root.Add(uniformScaling);
return root;
}
}
#endif
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 142929d5696a48568770947da7449ae8
timeCreated: 1710946285

View File

@ -0,0 +1,317 @@
// Staggart Creations (http://staggart.xyz)
// Copyright protected under Unity Asset Store EULA
// Copying or referencing source code for the production of new asset store, or public content, is strictly prohibited!
using System;
using System.Collections.Generic;
using sc.modeling.splines.runtime;
using UnityEditor;
using UnityEditor.EditorTools;
using UnityEditor.UIElements;
using UnityEngine.UIElements;
#if MATHEMATICS
using Unity.Mathematics;
using UnityEditor.Overlays;
using UnityEngine;
#endif
#if SPLINES
using UnityEngine.Splines;
using UnityEditor.Splines;
#endif
namespace sc.modeling.splines.editor
{
[EditorTool("Spline Mesh Vertex Color", typeof(SplineMesher))]
public class VertexColorTool : EditorTool
{
#if SPLINES
GUIContent m_IconContent;
public override GUIContent toolbarIcon => m_IconContent;
protected bool m_DisableHandles = false;
protected const float SLIDER_WIDTH = 150f;
static readonly Color headerBackgroundDark = new Color(0.1f, 0.1f, 0.1f, 0.9f);
static readonly Color headerBackgroundLight = new Color(1f, 1f, 1f, 0.9f);
public static Color headerBackground => EditorGUIUtility.isProSkin ? headerBackgroundDark : headerBackgroundLight;
public enum Channel
{
Red,
Green,
Blue,
Alpha
}
private static Channel targetChannel
{
get => (Channel)SessionState.GetInt(PlayerSettings.productName + "_SM_targetChannel", (int)Channel.Red);
set => SessionState.SetInt(PlayerSettings.productName + "_SM_targetChannel", (int)value);
}
public enum VisualizationChannel
{
None,
Current,
All
}
private static VisualizationChannel visualizationChannel
{
get => (VisualizationChannel)SessionState.GetInt(PlayerSettings.productName + "_SM_visualizationChannel", (int)VisualizationChannel.Current);
set => SessionState.SetInt(PlayerSettings.productName + "_SM_visualizationChannel", (int)value);
}
private VertexColorToolUI ui;
private Material vertexColorMaterial;
public static Texture2D LoadIcon()
{
return AssetDatabase.LoadAssetAtPath<Texture2D>($"{SplineMesher.kPackageRoot}/Editor/Resources/spline-mesher-color-icon-64px.psd");
}
void OnEnable()
{
m_IconContent = new GUIContent
{
image = LoadIcon(),
tooltip = "Adjust the mesh's vertex color along the spline"
};
Shader vertexColorShader = Resources.Load<Shader>("VisualizeVertexAttributes");
if (!vertexColorShader)
{
throw new Exception("[Spline Mesher] Could not locate the vertex color shader, was it deleted or not imported?");
}
vertexColorMaterial = new Material(vertexColorShader);
}
public override void OnActivated()
{
#if UNITY_2022_1_OR_NEWER
SceneView.AddOverlayToActiveView(ui = new VertexColorToolUI());
#endif
VertexColorToolUI.Show = true;
}
private Color GetColor()
{
switch (targetChannel)
{
case Channel.Red: return Color.red;
case Channel.Green: return Color.green;
case Channel.Blue: return Color.blue;
case Channel.Alpha: return Color.white;
default: return Color.white;
}
}
public override void OnToolGUI(EditorWindow window)
{
foreach (var m_target in targets)
{
SplineMesher splineMesher = (SplineMesher)m_target;
if (splineMesher == null || splineMesher.splineContainer == null)
continue;
if (visualizationChannel != VisualizationChannel.None)
{
int channel = -1;
bool transparent = false;
if (visualizationChannel == VisualizationChannel.All)
{
channel = 4;
transparent = true;
}
else channel = (int)targetChannel;
vertexColorMaterial.EnableKeyword("_DISPLAY_COLOR");
vertexColorMaterial.SetFloat("_ColorChannel", channel);
vertexColorMaterial.SetFloat("_Transparent", transparent ? 1 : 0);
vertexColorMaterial.SetPass(0);
if (splineMesher.outputObject)
{
MeshFilter mf = splineMesher.outputObject.GetComponent<MeshFilter>();
if (mf) Graphics.DrawMeshNow(mf.sharedMesh, mf.transform.localToWorldMatrix);
}
}
var splines = splineMesher.splineContainer.Splines;
List<SplineData<SplineMesher.VertexColorChannel>> data = null;
switch (targetChannel)
{
case Channel.Red: data = splineMesher.vertexColorRedData;
break;
case Channel.Green: data = splineMesher.vertexColorGreenData;
break;
case Channel.Blue: data = splineMesher.vertexColorBlueData;
break;
case Channel.Alpha: data = splineMesher.vertexColorAlphaData;
break;
}
Handles.color = GetColor();
for (var i = 0; i < splines.Count; i++)
{
if (i < data.Count)
{
var nativeSpline = new NativeSpline(splines[i], splineMesher.splineContainer.transform.localToWorldMatrix);
Undo.RecordObject(splineMesher, "Modifying Spline Mesh vertex color");
// User defined handles to manipulate width
DrawDataPoints(nativeSpline, data[i]);
nativeSpline.DataPointHandles<ISpline, SplineMesher.VertexColorChannel>(data[i], true, i);
if (GUI.changed)
{
splineMesher.Rebuild();
}
}
}
}
}
protected bool DrawDataPoints(ISpline spline, SplineData<SplineMesher.VertexColorChannel> splineData)
{
SplineMesher modeler = target as SplineMesher;
var inUse = false;
for (int dataFrameIndex = 0; dataFrameIndex < splineData.Count; dataFrameIndex++)
{
var dataPoint = splineData[dataFrameIndex];
var normalizedT = SplineUtility.GetNormalizedInterpolation(spline, dataPoint.Index, splineData.PathIndexUnit);
spline.Evaluate(normalizedT, out var position, out var tangent, out var up);
if (DrawDataPoint(position, tangent, up, dataPoint.Value, out var result))
{
dataPoint.Value = result;
splineData[dataFrameIndex] = dataPoint;
inUse = true;
modeler.Rebuild();
}
}
return inUse;
}
private const float boxPadding = 5f;
protected bool DrawDataPoint(Vector3 position, Vector3 tangent, Vector3 up, SplineMesher.VertexColorChannel inValue, out SplineMesher.VertexColorChannel outValue)
{
int id = m_DisableHandles ? -1 : GUIUtility.GetControlID(FocusType.Passive);
outValue = inValue;
if (tangent == Vector3.zero) return false;
if (Event.current.type == EventType.MouseUp && Event.current.button != 0 && (GUIUtility.hotControl == id))
{
Event.current.Use();
return false;
}
var handleColor = Handles.color;
if (GUIUtility.hotControl == id)
handleColor = Handles.selectedColor;
else if (GUIUtility.hotControl == 0 && (HandleUtility.nearestControl == id))
handleColor = Handles.preselectionColor;
var right = math.normalize(math.cross(tangent, up));
EditorGUI.BeginChangeCheck();
//if (GUIUtility.hotControl == id)
{
using (new Handles.DrawingScope(handleColor))
{
Handles.BeginGUI();
Vector2 screenPos = HandleUtility.WorldToGUIPoint(position);
Rect bgRect = new Rect(screenPos.x - (SLIDER_WIDTH * 0.5f) - boxPadding, screenPos.y - 80f, SLIDER_WIDTH + boxPadding, 55);
EditorGUI.DrawRect(bgRect, headerBackground);
Rect sliderRect = new Rect(screenPos.x - (SLIDER_WIDTH * 0.5f), screenPos.y - 50f, SLIDER_WIDTH - boxPadding, 22f);
outValue.value = EditorGUI.Slider(sliderRect, inValue.value, -1f, 1f);
outValue.value = math.clamp(outValue.value, -1f, 1f);
sliderRect.y -= 27f;
outValue.blend = EditorGUI.ToggleLeft(sliderRect, new GUIContent("Blend", "Blend the value with the original vertex color value"), inValue.blend);
Handles.EndGUI();
}
}
if (inValue.value != outValue.value)
{
//return true;
}
if (EditorGUI.EndChangeCheck()) return true;
return false;
}
public override void OnWillBeDeactivated()
{
#if UNITY_2022_1_OR_NEWER
SceneView.RemoveOverlayFromActiveView(ui);
#endif
VertexColorToolUI.Show = false;
}
#if UNITY_2022_1_OR_NEWER
[Overlay(defaultDisplay = true)]
#else
[Overlay(typeof(SceneView), "Spline Mesh Vertex Tool")]
#endif
public class VertexColorToolUI : Overlay, ITransientOverlay
{
public static bool Show;
public bool visible => Show;
public override VisualElement CreatePanelContent()
{
this.displayName = "Vertex Colors";
var root = new VisualElement();
EnumField targetChannel = new EnumField("Channel")
{
value = VertexColorTool.targetChannel,
tooltip = "Select which vertex color channel to edit"
};
targetChannel.Init(targetChannel.value);
targetChannel.RegisterValueChangedCallback(evt => { VertexColorTool.targetChannel = (Channel)evt.newValue; } );
root.Add(targetChannel);
EnumField vizChannel = new EnumField("Visualize")
{
value = VertexColorTool.visualizationChannel,
tooltip = "Draw the spline mesh with its vertex color value visualized"
};
vizChannel.Init(vizChannel.value);
vizChannel.RegisterValueChangedCallback(evt => { VertexColorTool.visualizationChannel = (VisualizationChannel)evt.newValue; } );
root.Add(vizChannel);
return root;
}
}
#endif
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 497d6d5be41f4b9a9ed5c14dd57f364a
timeCreated: 1724661966

View File

@ -0,0 +1,281 @@
using System;
using UnityEditor;
using UnityEditor.AnimatedValues;
using UnityEngine;
namespace sc.modeling.splines.editor
{
public class UI
{
public static readonly Color RedColor = new Color(1f, 0.31f, 0.34f);
public static readonly Color OrangeColor= new Color(1f, 0.68f, 0f);
public static readonly Color GreenColor = new Color(0.33f, 1f, 0f);
public static Texture CreateIcon(string data)
{
byte[] bytes = System.Convert.FromBase64String(data);
Texture2D icon = new Texture2D(32, 32, TextureFormat.RGBA32, false, false);
icon.LoadImage(bytes, true);
return icon;
}
public class Section
{
public bool Expanded
{
get => SessionState.GetBool(id, false);
set => SessionState.SetBool(id, value);
}
public readonly AnimBool anim;
private readonly string id;
private readonly GUIContent title;
public Section(Editor owner, string id, GUIContent title)
{
this.id = $"SM_{id}_SECTION";
this.title = title;
anim = new AnimBool(true);
anim.valueChanged.AddListener(owner.Repaint);
anim.speed = 12f;
anim.target = Expanded;
}
public void DrawHeader(Action clickAction)
{
UI.DrawHeader(title, Expanded, clickAction);
anim.target = Expanded;
}
}
public static void DrawH2(string text)
{
Rect backgroundRect = EditorGUILayout.GetControlRect();
backgroundRect.height = 25f;
var labelRect = backgroundRect;
// Background rect should be full-width
backgroundRect.xMin = 0f;
// Background
float backgroundTint = (EditorGUIUtility.isProSkin ? 0.1f : 1f);
EditorGUI.DrawRect(backgroundRect, new Color(backgroundTint, backgroundTint, backgroundTint, 0.2f));
// Title
EditorGUI.LabelField(labelRect, new GUIContent(text), Styles.H2);
EditorGUILayout.Space(backgroundRect.height * 0.5f);
}
public static void DrawSplitter(bool isBoxed = false)
{
var rect = GUILayoutUtility.GetRect(1f, 1f);
float xMin = rect.xMin;
// Splitter rect should be full-width
rect.xMin = 0f;
rect.width += 4f;
if (isBoxed)
{
rect.xMin = xMin == 7.0f ? 4.0f : EditorGUIUtility.singleLineHeight;
rect.width -= 1;
}
if (Event.current.type != EventType.Repaint)
return;
EditorGUI.DrawRect(rect, !EditorGUIUtility.isProSkin
? new Color(0.6f, 0.6f, 0.6f, 1.333f)
: new Color(0.12f, 0.12f, 0.12f, 1.333f));
}
private const float HeaderHeight = 22f;
public static bool DrawHeader(GUIContent content, bool isExpanded, Action clickAction)
{
DrawSplitter();
Rect backgroundRect = GUILayoutUtility.GetRect(1f, HeaderHeight);
var labelRect = backgroundRect;
labelRect.xMin += 8f;
labelRect.xMax -= 20f + 16 + 5;
var foldoutRect = backgroundRect;
foldoutRect.xMin -= 8f;
foldoutRect.y += 0f;
foldoutRect.width = HeaderHeight;
foldoutRect.height = HeaderHeight;
// Background rect should be full-width
backgroundRect.xMin = 0f;
backgroundRect.width += 4f;
// Background
float backgroundTint = (EditorGUIUtility.isProSkin ? 0.1f : 1f);
if (backgroundRect.Contains(Event.current.mousePosition)) backgroundTint *= EditorGUIUtility.isProSkin ? 1.5f : 0.9f;
EditorGUI.DrawRect(backgroundRect, new Color(backgroundTint, backgroundTint, backgroundTint, 0.2f));
// Title
EditorGUI.LabelField(labelRect, content, EditorStyles.boldLabel);
// Foldout
GUI.Label(foldoutRect, new GUIContent(isExpanded ? "" : "≡"), EditorStyles.boldLabel);
// Handle events
var e = Event.current;
if (e.type == EventType.MouseDown)
{
if (backgroundRect.Contains(e.mousePosition))
{
if (e.button == 0)
{
isExpanded = !isExpanded;
if(clickAction != null) clickAction.Invoke();
}
e.Use();
}
}
return isExpanded;
}
public static class Styles
{
private static GUIStyle _Section;
public static GUIStyle Section
{
get
{
if (_Section == null)
{
_Section = new GUIStyle()
{
margin = new RectOffset(0, 0, -5, 5),
padding = new RectOffset(10, 10, 5, 5),
clipping = TextClipping.Clip,
};
}
return _Section;
}
}
private static GUIStyle _H2;
public static GUIStyle H2
{
get
{
if (_H2 == null)
{
_H2 = new GUIStyle(GUI.skin.label)
{
richText = true,
alignment = TextAnchor.MiddleLeft,
wordWrap = true,
fontSize = 14,
fontStyle = FontStyle.Bold,
padding = new RectOffset(10, 0, 0, 0)
};
}
return _H2;
}
}
private static GUIStyle _Button;
public static GUIStyle Button
{
get
{
if (_Button == null)
{
_Button = new GUIStyle(GUI.skin.button)
{
alignment = TextAnchor.MiddleLeft,
stretchWidth = true,
richText = true,
wordWrap = true,
padding = new RectOffset()
{
left = 14,
right = 14,
top = 8,
bottom = 8
}
};
}
return _Button;
}
}
private static GUIStyle _UpdateText;
public static GUIStyle UpdateText
{
get
{
if (_UpdateText == null)
{
_UpdateText = new GUIStyle("Button")
{
//fontSize = 10,
alignment = TextAnchor.MiddleLeft,
stretchWidth = false,
};
}
return _UpdateText;
}
}
private static GUIStyle _Header;
public static GUIStyle Header
{
get
{
if (_Header == null)
{
_Header = new GUIStyle(GUI.skin.label)
{
richText = true,
alignment = TextAnchor.MiddleCenter,
wordWrap = true,
fontSize = 18,
fontStyle = FontStyle.Normal
};
}
return _Header;
}
}
private static GUIStyle _Footer;
public static GUIStyle Footer
{
get
{
if (_Footer == null)
{
_Footer = new GUIStyle(EditorStyles.centeredGreyMiniLabel)
{
richText = true,
alignment = TextAnchor.MiddleCenter,
wordWrap = true,
fontSize = 12
};
}
return _Footer;
}
}
}
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 53567e303feb44e69412d70fe933ba61
timeCreated: 1715593165

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a4d2c9548c6b49a3b4cc52a306bd6cfa
timeCreated: 1646568770

View File

@ -0,0 +1,175 @@
using System;
using UnityEngine;
#if SPLINES
using UnityEngine.Splines;
#endif
namespace sc.modeling.splines.runtime
{
[Serializable]
public class Settings
{
public enum ColliderType
{
Box,
Mesh
}
[Serializable]
public class Collision
{
[Tooltip("Add a Mesh Collider component and also generate a collision mesh for it")]
public bool enable;
[Tooltip("Do not create a visible mesh, but only create the collision mesh")]
public bool colliderOnly;
[Tooltip("The \"Box\" type is an automatically created collider mesh, based on the source mesh's bounding box.")]
public ColliderType type;
[Min(0)]
[Tooltip("Subdivide the collision box, ensures it bends better in curves.")]
public int boxSubdivisions = 0;
public Mesh collisionMesh;
}
public Collision collision = new Collision();
[Serializable]
public class Distribution
{
[Min(1)]
public int segments = 1;
[Tooltip("Automatically calculate the number of segments based on the length of the spline")]
public bool autoSegmentCount = true;
[Tooltip("Stretch the segments so that they fit exactly over the entire spline")]
public bool stretchToFit = true;
[Tooltip("Ensure the input mesh is repeated evenly, instead of cutting it off when it doesn't fit on the remainder of the spline.")]
public bool evenOnly = false;
[Min(0f)]
[Tooltip("Shift the mesh X number of units from the start of the spline")]
public float trimStart;
[Min(0f)]
[Tooltip("Shift the mesh X number of units from the end of the spline")]
public float trimEnd;
//[Min(0f)]
[Tooltip("Space between each mesh segment")]
public float spacing;
}
public Distribution distribution = new Distribution();
[Serializable]
public class Deforming
{
[Tooltip("Note that offsetting can cause vertices to sort of bunch up." +
"\n\nFor the best results, create a separate spline parallel to the one you are trying to offset from.")]
[UnityEngine.Serialization.FormerlySerializedAs("offset")]
public Vector2 curveOffset;
[Tooltip("Adds a global offset to all vertices, effectively moving its pivot." +
"\n\nNote: if the pivot is already centered, this appears to do exactly the same as the Curve Offset parameter")]
public Vector2 pivotOffset;
public Vector3 scale = Vector3.one;
#if SPLINES
public PathIndexUnit scalePathIndexUnit = PathIndexUnit.Distance;
#endif
[UnityEngine.Serialization.FormerlySerializedAs("ignoreRoll")]
[Tooltip("Ignore the spline's roll rotation and ensure the geometry stays flat")]
public bool ignoreKnotRotation = false;
[Tooltip("The amount of times a complete rotation is completed over this distance. With a value of 1, a complete roll is created over 1 unit over the spline curve")]
public enum RollMode
{
PerVertex,
PerSegment
}
[Tooltip("Specify if the rotation roll is calculated for every vertex, or once and applied over the entire segment")]
public RollMode rollMode;
[Min(0f)]
public float rollFrequency = 0.1f;
[Range(-360f, 360f)]
public float rollAngle = 0f;
#if SPLINES
public PathIndexUnit rollPathIndexUnit = PathIndexUnit.Distance;
#endif
}
public Deforming deforming = new Deforming();
[Serializable]
public class UV
{
public Vector2 scale = Vector2.one;
public Vector2 offset = Vector2.zero;
public enum StretchMode
{
None,
[InspectorName("U (X)")]
U,
[InspectorName("V (Y)")]
V
}
[Tooltip("Overwrite the target UV value with that of the vertex position over the spline (normalized 0-1 value)")]
public StretchMode stretchMode;
}
public UV uv = new UV();
[Serializable]
public class Color
{
#if SPLINES
public PathIndexUnit pathIndexUnit = PathIndexUnit.Distance;
#endif
}
public Color color;
[Serializable]
public class Conforming
{
[Tooltip("Project the spline curve into the geometry underneath it. Relies on physics raycasts.")]
public bool enable;
[Tooltip("A ray is shot this high above every vertex, and reach this much units below it." +
"\n\n" +
"If a spline is dug into the terrain too much, increase this value to still get valid raycast hits." +
"\n\n" +
"Internally, the minimum distance is always higher than the mesh's total height.")]
public float seekDistance = 5f;
[Tooltip("Ignore raycast hits from colliders that aren't from a Terrain")]
public bool terrainOnly;
[Tooltip("Only accept raycast hits from colliders on these layers")]
public LayerMask layerMask = -1;
[Tooltip("Rotate the geometry to match the orientation of the surface beneath it")]
public bool align = true;
[Tooltip("Reorient the geometry normals to match the surface hit, for correct lighting")]
public bool blendNormal = true;
}
public Conforming conforming = new Conforming();
[Serializable]
public class OutputMesh
{
[Tooltip("If enabled, Unity will keep a readable copy of the mesh around in memory. Allowing other scripts to access its data, and possible alter it.")]
public bool keepReadable = false;
[Tooltip("Save relative vertex positions in the (assumingly) unused UV components. If disabled, the source mesh's original values are retained." +
"\n" +
"\n[UV0.Z]: (0-1) distance over spline length" +
"\n[UV0.W]: (0-1) distance over height of mesh" +
"\n\n" +
"This data may be used in shaders for tailored effects, such as animations.")]
public bool storeGradientsInUV = true;
[Tooltip("Multiplier for the pack-margin value. A value of 1 equates to 1 texel")]
[Min(0.01f)]
public float lightmapUVMarginMultiplier = 1f;
[Range(15f, 90f)]
[Tooltip("This angle (in degrees) or greater between triangles will cause UV seam to be created.")]
public float lightmapUVAngleThreshold = 88f;
}
public OutputMesh mesh = new OutputMesh();
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 99f9e497f068430a89a27dd7a070a108
timeCreated: 1711018083

View File

@ -0,0 +1,831 @@
// Staggart Creations (http://staggart.xyz)
// Copyright protected under Unity Asset Store EULA
// Copying or referencing source code for the production of new asset store, or public content, is strictly prohibited!
//^ NOTE: Transforming the spline point to world-space results in the mesh respecting non-uniformly scaled splines.
//But this breaks them when the spline is rotated.
//In favor of rotation, this is not being done
//#define SM_WORLD_SPACE_TRANSFORM
//#define SM_ADDITIONAL_DATA
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Profiling;
using UnityEngine.Rendering;
#if MATHEMATICS
using Unity.Mathematics;
#endif
#if SPLINES
using UnityEngine.Splines;
using Interpolators = UnityEngine.Splines.Interpolators;
#endif
namespace sc.modeling.splines.runtime
{
public static class SplineMeshGenerator
{
#if SPLINES && MATHEMATICS
//Mesh data
private static readonly List<Vector3> vertices = new List<Vector3>();
private static readonly List<Vector3> normals = new List<Vector3>();
private static readonly List<Vector4> tangents = new List<Vector4>();
private static readonly List<Vector4> uv0 = new List<Vector4>();
#if SM_ADDITIONAL_DATA
private static readonly List<Vector4> uv2 = new List<Vector4>();
#endif
//Holds an array of indices for each submesh
private static readonly List<List<int>> triangles = new List<List<int>>();
private static readonly List<Color> colors = new List<Color>();
private static Vector3[] sourceVertices;
private static List<int[]> sourceTriangles = new List<int[]>();
private static Vector3[] sourceNormals;
private static List<Vector4> sourceUv0 = new List<Vector4>();
private static Vector4[] sourceTangents;
private static Color[] sourceColors;
private static bool hasTangents;
private static bool hasUV;
private static bool hasSourceVertexColor;
private static bool setVertexColor;
private static List<CombineInstance> combineInstances = new List<CombineInstance>();
private static Bounds bounds;
private static float3 boundsMin;
private static float3 boundsMax;
private static float4x4 splineLocalToWorld;
public static readonly Interpolators.LerpFloat3 Float3Interpolator = new Interpolators.LerpFloat3();
public static readonly Interpolators.LerpFloat FloatInterpolator = new Interpolators.LerpFloat();
private static int CalculateSegmentCount(Settings settings, float splineLength, float meshLength, bool closed)
{
int segmentCount = settings.distribution.segments;
if (settings.distribution.autoSegmentCount)
{
//Seems to need one extra segment to full close the loop
if (closed) splineLength += 0.001f;
if (settings.distribution.stretchToFit)
{
return (int)math.ceil((splineLength / meshLength));
}
if (settings.distribution.evenOnly)
{
return (int)math.floor((splineLength / meshLength));
}
else
{
return (int)math.ceil((splineLength / meshLength));
}
}
return segmentCount;
}
/// <summary>
/// Tiles and deforms the sourceMesh along splines within the container
/// </summary>
/// <param name="splineContainer"></param>
/// <param name="sourceMesh">Input mesh</param>
/// <param name="worldToLocalMatrix">Transform matrix of the renderer the mesh is to be used on</param>
/// <param name="settings"></param>
/// <param name="scaleData"></param>
/// <param name="rollData"></param>
/// <param name="redVertexColor"></param>
/// <param name="greenVertexColor"></param>
/// <param name="blueVertexColor"></param>
/// <param name="alphaVertexColor"></param>
/// <returns></returns>
/// <exception cref="Exception">Bails out if the spline is too short</exception>
public static Mesh CreateMesh(SplineContainer splineContainer, Mesh sourceMesh, float4x4 worldToLocalMatrix, Settings settings,
List<SplineData<float3>> scaleData = null,
List<SplineData<float>> rollData = null,
List<SplineData<SplineMesher.VertexColorChannel>> redVertexColor = null,
List<SplineData<SplineMesher.VertexColorChannel>> greenVertexColor = null,
List<SplineData<SplineMesher.VertexColorChannel>> blueVertexColor = null,
List<SplineData<SplineMesher.VertexColorChannel>> alphaVertexColor = null
)
{
Mesh outputMesh = new Mesh();
int submeshCount = sourceMesh.subMeshCount;
var splineCount = splineContainer.Splines.Count;
//Note: every submesh requires its own CombineInstance
combineInstances.Clear();
//Debug.Log($"Generating for {splineCount} spline(s) from {sourceMesh.name} with {submeshCount} submesh(es)");
boundsMin = Vector3.one * -math.INFINITY;
boundsMax = Vector3.one * math.INFINITY;
//Get initial arrays
sourceVertices = sourceMesh.vertices;
int sourceVertexCount = sourceVertices.Length;
sourceNormals = sourceMesh.normals;
sourceMesh.GetUVs(0, sourceUv0);
sourceTangents = sourceMesh.tangents;
sourceColors = sourceMesh.colors;
bounds = sourceMesh.bounds;
sourceTriangles.Clear();
for (int submeshIndex = 0; submeshIndex < submeshCount; submeshIndex++)
{
//Input
sourceTriangles.Add(sourceMesh.GetTriangles(submeshIndex));
}
hasUV = sourceUv0.Count > 0;
hasTangents = sourceTangents.Length > 0;
hasSourceVertexColor = sourceColors.Length > 0;
Color vertexColor = Color.black;
setVertexColor = hasSourceVertexColor;
splineLocalToWorld = splineContainer.transform.localToWorldMatrix;
int vertexCount = 0;
Profiler.BeginSample($"Spline Mesher: Process {splineCount} Spline(s)");
#if SM_WORLD_SPACE_TRANSFORM
float3 containerScale = splineContainer.transform.lossyScale;
#endif
bool hasScaleData = scaleData != null;
bool hasRollData = rollData != null;
bool hasRedColorData = redVertexColor != null;
bool hasGreenColorData = greenVertexColor != null;
bool hasBlueColorData = blueVertexColor != null;
bool hasAlphaColorData = alphaVertexColor != null;
float2 trimming = new float2(settings.distribution.trimStart, settings.distribution.trimEnd);
for (int splineIndex = 0; splineIndex < splineCount; splineIndex++)
{
Spline spline = splineContainer.Splines[splineIndex];
float splineLength = spline.CalculateLength(splineLocalToWorld);
//T-values of the trimming
float2 trimRange = new float2((trimming.x / splineLength), 1f - (trimming.y / splineLength));
float trimLength = trimming.x + trimming.y;
splineLength -= trimLength;
float zScale = settings.deforming.scale.z;
float meshHeight = bounds.size.y;
float meshLength = math.max(0.1f, bounds.size.z * zScale);
float segmentLength = meshLength + settings.distribution.spacing;
if (splineLength <= 0.02f)
{
//Debug.LogError($"Spline #{splineIndex} in {splineContainer.name} is too short ({splineLength})");
continue;
}
//Too short
if (splineLength < segmentLength)
{
//Debug.LogWarning($"Input mesh ({sourceMesh.name}) is larger ({meshLength}) than the length of the spline #{splineIndex} ({splineLength}), no output mesh possible");
//continue;
}
int CalculateSegments()
{
//Spline length needs a tiny bit of padding, otherwise its possible that it miscalculates the count by 1 to few
return CalculateSegmentCount(settings, splineLength, segmentLength, spline.Closed);
}
int segments = CalculateSegments();
if (segments == 0) continue;
//Scale each segment by the right amount so that they all evenly fit along the spline
if (settings.distribution.stretchToFit)
{
float totalMeshLength = segments * segmentLength;
//Scale value needed for each individual segment to achieve full coverage
float zScaleDelta = splineLength / totalMeshLength;
zScale *= zScaleDelta;
//Factor in new scale
meshLength = math.max(0.1f, bounds.size.z * zScale);
segmentLength = meshLength + settings.distribution.spacing;
//Recalculate
segments = CalculateSegments();
//Debug.Log($"Segments:{segments} Segment length: {segmentLength} - Total mesh length: {segments * segmentLength} Spline length {splineLength}. Delta:{zScaleDelta}. Z-scale: {zScale} (new mesh length:{segments * bounds.size.z * zScale})");
if (segments == 0) continue;
}
var splineMesh = new Mesh();
splineMesh.subMeshCount = submeshCount;
//Clear data for current spline, which is to get its own mesh.
triangles.Clear();
for (int submeshIndex = 0; submeshIndex < submeshCount; submeshIndex++)
{
triangles.Add(new List<int>());
}
vertices.Clear();
normals.Clear();
tangents.Clear();
uv0.Clear();
colors.Clear();
#if SM_ADDITIONAL_DATA
uv2.Clear();
#endif
float3 origin = 0f;
float3 tangent = 0f;
float3 up = 0f;
float3 forward = 0f;
float3 right = 0f;
quaternion rotation = quaternion.identity;
quaternion normalRotation = quaternion.identity;
float3 splineScale = new float3(1f);
//int splineSamples = 0;
for (int i = 0; i < segments; i++)
{
float segmentOffset = ((float)i * (segmentLength));
float prevZ = -1;
for (int v = 0; v < sourceVertexCount; v++)
{
//t-value of vertex over the length of the mesh. Normalized value 0-1
float localVertPos = (sourceVertices[v].z - bounds.min.z) / (bounds.max.z - bounds.min.z);
//localVertPos = math.clamp(localVertPos, 0f, 1f);
float distance = (localVertPos * meshLength) + segmentOffset;
float center = (0.5f * meshLength) + segmentOffset;
//Check if Z-value of vertex is changing, meaning sampling moves forward
var resample = (math.abs(distance - prevZ) > 0f);
//resample = true;
if (resample) prevZ = distance;
float3 splinePoint = origin;
float t = distance / splineLength;
//Important optimization. If a mesh has edge loops (vertices sharing the same Z-value) the spline gets unnecessarily re-sampled
//In this case, all the spline-related information is identical, so doesn't need to be recalculated.
if (resample)
{
Profiler.BeginSample("Spline Mesher: Sample Spline");
{
//Remap normalized (0-1) t-range to trimmed range
t = math.lerp(trimRange.x, trimRange.y, t);
t = math.clamp(t, 0.000001f, 0.999999f); //Ensure a tangent can always be derived
spline.Evaluate(t, out origin, out tangent, out up);
//SplineCache.Evaluate(splineContainer, splineIndex, t, out origin, out tangent, out up);
//splineSamples++;
//Recalculate tangent, required for a correct value on scaled spline containers
//float3 prevPosition = spline.EvaluatePosition(t - 0.001f);
//tangent = origin - prevPosition;
forward = math.normalize(tangent);
right = math.cross(up, forward);
rotation = quaternion.LookRotation(forward, up);
if (settings.deforming.ignoreKnotRotation && settings.deforming.rollAngle == 0)
{
rotation = RollCorrectedRotation(forward);
right = math.rotate(rotation, math.right());
}
if (settings.deforming.rollAngle != 0f || hasRollData)
{
//Aligned conforming will completely override this rotation, so skip the calculations
if ((settings.conforming.enable && settings.conforming.align) == false)
{
Profiler.BeginSample("Spline Mesher: Calculate roll rotation");
{
float rollInterpolator = settings.deforming.rollMode == Settings.Deforming.RollMode.PerSegment ? (center / splineLength) : t;
float rollFrequency = settings.deforming.rollFrequency > 0 ? settings.deforming.rollFrequency * (rollInterpolator * splineLength) : 1f;
float rollAngle = settings.deforming.rollAngle;
float rollValue = rollAngle * rollFrequency;
if (hasRollData)
{
if (rollData[splineIndex].Count > 0)
{
rollValue += rollData[splineIndex].Evaluate(spline,
spline.ConvertIndexUnit(rollInterpolator, PathIndexUnit.Normalized, settings.deforming.rollPathIndexUnit),
settings.deforming.rollPathIndexUnit, FloatInterpolator);
}
}
//Not needed, only a tiny bit of skewing
//forward = math.normalize(spline.EvaluateTangent(rollInterpolator));
//rotation = Quaternion.AngleAxis(-rollValue, forward) * rotation;
rotation = math.mul(quaternion.AxisAngle(forward, -rollValue * Mathf.Deg2Rad), rotation);
//Recalculate vectors, particularly for the curve offset functionality later on
right = math.mul(rotation, math.right());
up = math.mul(rotation, math.up());
}
Profiler.EndSample();
}
}
}
Profiler.EndSample();
splineScale = new float3(1f);
if (hasScaleData)
{
//Important to not attempt to sample empty data, as this results in a scale of (0,0,0)
if (scaleData[splineIndex].Count > 0)
{
splineScale = scaleData[splineIndex].Evaluate(spline,
spline.ConvertIndexUnit(distance, PathIndexUnit.Distance, settings.deforming.scalePathIndexUnit),
settings.deforming.scalePathIndexUnit, Float3Interpolator);
}
}
//Counter scale of spline container transform
//splineScale /= containerScale;
splineScale.x *= settings.deforming.scale.x;
splineScale.y *= settings.deforming.scale.y;
#if SM_WORLD_SPACE_TRANSFORM
//Counter scale again to allow for non-uniform scaling of the spline
splineScale.x /= containerScale.x;
splineScale.y /= containerScale.y;
#endif
//Never scale the Z-axis, as this affects distribution of the vertices
splineScale.z = 0f;
//Update
splinePoint = origin;
normalRotation = rotation;
}
//Outside of resampling scope, since the color may be different over the vertical length of the mesh
Profiler.BeginSample("Spline Mesher: Sample Vertex Colors");
{
vertexColor = hasSourceVertexColor ? sourceColors[v] : Color.clear;
float vcSamplePos = spline.ConvertIndexUnit(distance, PathIndexUnit.Distance, settings.color.pathIndexUnit);
if (hasRedColorData)
{
if (redVertexColor[splineIndex].Count > 0)
{
vertexColor.r = redVertexColor[splineIndex].Evaluate(spline, vcSamplePos, settings.color.pathIndexUnit,
new SplineMesher.VertexColorChannel.LerpVertexColorData(vertexColor.r));
setVertexColor = true;
}
}
if (hasGreenColorData)
{
if (greenVertexColor[splineIndex].Count > 0)
{
vertexColor.g = greenVertexColor[splineIndex].Evaluate(spline, vcSamplePos, settings.color.pathIndexUnit,
new SplineMesher.VertexColorChannel.LerpVertexColorData(vertexColor.g));
setVertexColor = true;
}
}
if (hasBlueColorData)
{
if (blueVertexColor[splineIndex].Count > 0)
{
vertexColor.b = blueVertexColor[splineIndex].Evaluate(spline, vcSamplePos, settings.color.pathIndexUnit,
new SplineMesher.VertexColorChannel.LerpVertexColorData(vertexColor.b));
setVertexColor = true;
}
}
if (hasAlphaColorData)
{
if (alphaVertexColor[splineIndex].Count > 0)
{
vertexColor.a = alphaVertexColor[splineIndex].Evaluate(spline, vcSamplePos, settings.color.pathIndexUnit,
new SplineMesher.VertexColorChannel.LerpVertexColorData(vertexColor.a));
setVertexColor = true;
}
}
}
Profiler.EndSample();
if (settings.conforming.enable)
{
Profiler.BeginSample("Spline Mesher: Conform to colliders");
//Vertex position in spline's local space to world-space
float3 positionWS = math.transform(splineLocalToWorld, splinePoint);
if (PerformConforming(positionWS, settings.conforming, meshHeight, out float3 hitPosition, out float3 hitNormal))
{
//Convert information from world-space back to spline's local space
hitPosition = splineContainer.transform.InverseTransformPoint(hitPosition);
hitNormal = splineContainer.transform.InverseTransformVector(hitNormal);
splinePoint.y = hitPosition.y;
quaternion hitRotation = quaternion.LookRotationSafe(tangent, hitNormal);
//Copy normal of surface, to be used for deforming
if (settings.conforming.align)
{
rotation = hitRotation;
}
if (settings.conforming.blendNormal)
{
normalRotation = hitRotation;
}
}
Profiler.EndSample();
}
splinePoint += right * settings.deforming.curveOffset.x;
splinePoint.y += settings.deforming.curveOffset.y;
Profiler.BeginSample("Spline Mesher: Transform Vertices");
float3 vertexPositionLocal = (float3)sourceVertices[v] + (math.forward() * settings.distribution.spacing);
vertexPositionLocal.x += settings.deforming.pivotOffset.x;
vertexPositionLocal.y += settings.deforming.pivotOffset.y;
//Transform vertex to spline point and rotation (spline's world-space)
#if SM_WORLD_SPACE_TRANSFORM //See note at top
splinePoint = math.mul(splineLocalToWorld, new float4(splinePoint, 1.0f)).xyz;
//rotation = splineContainer.transform.rotation * rotation;
#endif
float3 position = splinePoint + math.rotate(rotation, vertexPositionLocal * splineScale);
#if !SM_WORLD_SPACE_TRANSFORM
//Transform position from spline's local-space into world-space
float3 vertexPosition = math.mul(splineLocalToWorld, new float4(position, 1.0f)).xyz;
#else
//Already in world-space
float3 vertexPosition = position;
#endif
//Make that the local-space position of the mesh filter
vertexPosition = math.mul(worldToLocalMatrix, new float4(vertexPosition, 1.0f)).xyz;
//Also transform the normal
float3 vertexNormal = math.rotate(normalRotation, sourceNormals[v]);
if (hasTangents)
{
float4 sourceTangent = new float4(sourceTangents[v]);
float3 vertexTangent = math.rotate(normalRotation, sourceTangent.xyz);
tangents.Add(new float4(vertexTangent, 1.0f));
}
Profiler.EndSample();
//Extend bounds as it expands
boundsMin = math.min(position, boundsMin);
boundsMax = math.max(position, boundsMax);
//Assign vertex attributes
vertices.Add(vertexPosition);
normals.Add(vertexNormal);
if (hasUV)
{
Vector4 uv = sourceUv0[v];
if (settings.uv.stretchMode == Settings.UV.StretchMode.U) uv.x = t;
if (settings.uv.stretchMode == Settings.UV.StretchMode.V) uv.y = t;
uv = (uv * settings.uv.scale) + settings.uv.offset;
if (settings.mesh.storeGradientsInUV)
{
//Normalized Distance
uv.z = t;
//Normalized Height
uv.w = (float)math.abs(vertexPositionLocal.y / (meshHeight * splineScale.y));
}
uv0.Add(uv);
}
if(setVertexColor) colors.Add(vertexColor);
#if SM_ADDITIONAL_DATA
uv2.Add(new Vector4(
(float)i/segments, //Segment ID
(float)(v * (i+1))/(segments * sourceVertexCount), //Vertex ID
((float)splineIndex/splineCount), //Spline ID
noise.cnoise(new float2(v+ distance * splineLength, i + vertexPositionLocal.y * meshHeight)) //Noise
));
#endif
}
for (int submeshIndex = 0; submeshIndex < submeshCount; submeshIndex++)
{
var triCount = sourceTriangles[submeshIndex].Length;
for (int v = 0; v < triCount; v++)
{
triangles[submeshIndex].Insert(i * triCount + v, sourceTriangles[submeshIndex][v] + (sourceVertexCount * i));
}
}
}
var splineVertCount = vertices.Count;
vertexCount += splineVertCount * submeshCount;
//Debug.Log($"Estimated spline samples: {segments * sourceVertexCount}. Actual spline samples performed: {splineSamples}. Improvement: {100f/(1f/((float)(segments * sourceVertexCount) / (float)splineSamples) * 100f)*100f}%");
Profiler.BeginSample($"Spline Mesher: Set mesh data for spline #{splineIndex}");
splineMesh.indexFormat = splineVertCount >= 65535 ? IndexFormat.UInt32 : IndexFormat.UInt16;
splineMesh.SetVertices(vertices, 0, splineVertCount, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds);
splineMesh.SetNormals(normals, 0, splineVertCount, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds);
if(hasTangents) splineMesh.SetTangents(tangents);
if(hasUV) splineMesh.SetUVs(0, uv0);
#if SM_ADDITIONAL_DATA
splineMesh.SetUVs(2, uv2);
#endif
if(setVertexColor) splineMesh.SetColors(colors);
for (int submeshIndex = 0; submeshIndex < submeshCount; submeshIndex++)
{
splineMesh.SetIndices(triangles[submeshIndex], MeshTopology.Triangles, submeshIndex, false);
CombineInstance combineInstance = new CombineInstance()
{
mesh = splineMesh,
subMeshIndex = submeshIndex
};
combineInstances.Add(combineInstance);
}
Profiler.EndSample();
//Debug.Log($"Generated mesh for spline #{splineIndex} with {submeshCount} submeshs");
}
Profiler.EndSample();
Profiler.BeginSample("Spline Mesher: Composite Output Mesh");
outputMesh.indexFormat = vertexCount >= 65535 ? IndexFormat.UInt32 : IndexFormat.UInt16;
//Note: Warning about Instance X being null is attributed to a Spline having a length of 0. Therefor it was counted, but no mesh was created for it.
//Bug: if submeshes aren't merged, a submesh is created for each spline
outputMesh.CombineMeshes(combineInstances.ToArray(), submeshCount == 1, false);
//Debug.Log($"Combined {splineCount} spline meshes from {sourceMesh.name} with {outputMesh.subMeshCount} submeshes");
outputMesh.UploadMeshData(!settings.mesh.keepReadable);
outputMesh.bounds.SetMinMax(boundsMin, boundsMax);
outputMesh.name = $"{sourceMesh.name} Spline";
Profiler.EndSample();
//Test, to verify if normals were rotated correctly
//outputMesh.RecalculateNormals();
return outputMesh;
}
public static bool PerformConforming(float3 positionWS, Settings.Conforming settings, float objectHeight, out float3 hitPosition, out float3 hitNormal)
{
var validHit = false;
float dist = math.max(objectHeight + settings.seekDistance, 1f);
hitPosition = float3.zero;
hitNormal = float3.zero;
RaycastHit hit = new RaycastHit();
if (Physics.Raycast(positionWS + (math.up() * dist), -math.up(), out hit, dist * 2f, settings.layerMask, QueryTriggerInteraction.Ignore))
{
validHit = true;
if (settings.terrainOnly)
{
validHit = hit.collider.GetType() == typeof(TerrainCollider);;
if (validHit == false) return false;
}
hitPosition = hit.point;
hitNormal = hit.normal;
}
return validHit;
}
/// <summary>
/// Apply generic transforms to the mesh
/// </summary>
/// <param name="input"></param>
/// <param name="rotation">Euler rotation</param>
/// <param name="flipX"></param>
/// <param name="flipY"></param>
/// <returns></returns>
public static Mesh TransformMesh(Mesh input, Vector3 rotation, bool flipX, bool flipY)
{
var rotationAmount = math.abs(math.length(rotation));
if (rotationAmount > 0.01f || flipX || flipY)
{
Vector3[] outputVertices = input.vertices;
int vertexCount = outputVertices.Length;
Vector3[] outputNormals = input.normals;
int[] outputTriangles = input.triangles;
int triCount = outputTriangles.Length;
Bounds outputBounds = input.bounds;
if (rotationAmount > 0.01f)
{
(rotation.x, rotation.z) = (rotation.z, rotation.x);
outputBounds = new Bounds();
Quaternion m_meshRotation = Quaternion.Euler(rotation);
for (int i = 0; i < vertexCount; i++)
{
outputVertices[i] = math.rotate(m_meshRotation, outputVertices[i]);
outputBounds.Encapsulate(outputVertices[i]);
outputNormals[i] = math.rotate(m_meshRotation, outputNormals[i]);
}
}
if (flipX || flipY)
{
//Reverse triangle order if negatively scaled
var triangleCount = triCount / 3;
for (int j = 0; j < triangleCount; j++)
{
(outputTriangles[j * 3], outputTriangles[j * 3 + 1]) = (outputTriangles[j * 3 + 1], outputTriangles[j * 3]);
}
//Rotate normals
Quaternion m_meshRotation = Quaternion.Euler(flipY ? 180f : 0f, flipX ? 180f : 0f, 0f);
for (int i = 0; i < vertexCount; i++)
{
outputNormals[i] = math.rotate(m_meshRotation, outputNormals[i]);
}
}
Mesh output = new Mesh();
output.name = input.name;
output.SetVertices(outputVertices, 0, vertexCount, MeshUpdateFlags.DontValidateIndices | MeshUpdateFlags.DontRecalculateBounds);
output.triangles = outputTriangles;
//output.RecalculateBounds();
output.bounds = outputBounds;
output.uv = input.uv;
output.uv2 = input.uv2;
output.normals = outputNormals;
output.colors = input.colors;
output.tangents = input.tangents;
output.subMeshCount = input.subMeshCount;
//Copy readable state
output.UploadMeshData(input.isReadable);
return output;
}
return input;
}
public static quaternion RollCorrectedRotation(float3 forward)
{
float3 euler = Quaternion.LookRotation(forward, math.up()).eulerAngles;
return quaternion.AxisAngle(math.up(), euler.y * Mathf.Deg2Rad);
}
private static readonly Vector2[] corners = new[]
{
new Vector2(-0.5f, -0.5f), //Bottom-left
new Vector2(-0.5f, 0.5f), //Top-left
new Vector2(0.5f, 0.5f), //Top-right
new Vector2(0.5f, -0.5f), //Bottom-right
new Vector2(-0.5f, -0.5f), //Bottom-right
};
/// <summary>
/// Creates a cube mesh from the input mesh's bounds.
/// </summary>
/// <param name="sourceMesh"></param>
/// <param name="subdivisions">Number of edge loops across the length</param>
/// <param name="caps">Create two triangles at the front and back</param>
/// <returns></returns>
public static Mesh CreateBoundsMesh(Mesh sourceMesh, int subdivisions = 0, bool caps = false)
{
Bounds m_bounds = sourceMesh.bounds;
Mesh boundsMesh = new Mesh();
boundsMesh.name = $"{sourceMesh.name} Bounds";
Vector3 scale = m_bounds.size;
Vector3 offset = m_bounds.center;
int edges = 4;
subdivisions = Mathf.Max(0, subdivisions);
int lengthSegments = subdivisions+1;
int xCount = edges + 1;
int zCount = lengthSegments + 1;
int numVertices = xCount * zCount;
List<Vector3> mVertices = new List<Vector3>();
List<int> mTriangles = new List<int>();
float scaleZ = scale.z / lengthSegments;
for (int z = 0; z < zCount; z++)
{
//Move clockwise to position vertices in each corner around the edge loop
for (int x = 0; x < xCount; x++)
{
Vector3 vertex;
vertex.x = (corners[x].x * scale.x) + offset.x;
vertex.y = (corners[x].y * scale.y) + offset.y;
vertex.z = z * scaleZ - (scale.z * 0.5f) + offset.z;
mVertices.Add(vertex);
}
if (z < zCount-1) //Stop at 2nd last row
{
for (int x = 0; x < edges; x++)
{
mTriangles.Insert(0, (z * xCount) + x);
mTriangles.Insert(1, ((z + 1) * xCount) + x);
mTriangles.Insert(2, (z * xCount) + x + 1);
mTriangles.Insert(3, ((z + 1) * xCount) + x);
mTriangles.Insert(4, ((z + 1) * xCount) + x + 1);
mTriangles.Insert(5, (z * xCount) + x + 1);
}
}
}
if (caps)
{
//Back quad
mTriangles.Add(1);
mTriangles.Add(2);
mTriangles.Add(0);
mTriangles.Add(2);
mTriangles.Add(3);
mTriangles.Add(0);
//Front quad
mTriangles.Add(numVertices-4);
mTriangles.Add(numVertices-5);
mTriangles.Add(numVertices-3);
mTriangles.Add(numVertices-2);
mTriangles.Add(numVertices-3);
mTriangles.Add(numVertices-5);
}
boundsMesh.SetVertices(mVertices, 0, numVertices, MeshUpdateFlags.DontNotifyMeshUsers | MeshUpdateFlags.DontRecalculateBounds | MeshUpdateFlags.DontValidateIndices);
boundsMesh.subMeshCount = 1;
boundsMesh.SetIndices(mTriangles, MeshTopology.Triangles, 0, false);
boundsMesh.RecalculateNormals();
boundsMesh.bounds = m_bounds;
return boundsMesh;
}
#endif
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4e07c828419247278e372618a641b045
timeCreated: 1711010900

View File

@ -0,0 +1,307 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using Object = UnityEngine.Object;
#if UNITY_EDITOR
using UnityEditor;
#endif
#if MATHEMATICS
using Unity.Mathematics;
#endif
#if SPLINES
using UnityEngine.Splines;
#endif
namespace sc.modeling.splines.runtime
{
public partial class SplineMesher
{
[Serializable]
public class Cap
{
public Cap(Position position)
{
this.position = position;
}
public enum Position
{
Start,
End
}
public readonly Position position;
public GameObject prefab;
[SerializeField] [ HideInInspector]
private int previousPrefabID;
public bool HasPrefabChanged()
{
if (prefab == null) return true;
int hashCode = prefab.GetHashCode();
if (hashCode != previousPrefabID)
{
previousPrefabID = hashCode;
return true;
}
return false;
}
[Tooltip("Positional offset, relative to the curve's tangent")]
public Vector3 offset;
[Tooltip("Shifts the object along the spline curve by this many units")]
[Min(0f)]
public float shift = 0f;
[Tooltip("Align the object's forward direction to the tangent and roll of the spline")]
public bool align = true;
[Tooltip("Rotation in degrees, added to the object's rotation")]
public Vector3 rotation;
[Tooltip("Factor in the scale configured under the Deforming section, as well as scale data points created in the editor.")]
public bool matchScale = true;
public Vector3 scale = Vector3.one;
//Save a reference to the instantiated objects, so they can be accessed again, deleted when necessary.
//[HideInInspector]
public GameObject[] instances = Array.Empty<GameObject>();
public bool RequiresRespawn()
{
return HasPrefabChanged() || HasNoInstances() || HasMissingInstances();
}
public bool HasNoInstances()
{
return instances.Length == 0;
}
public bool HasMissingInstances()
{
for (int i = 0; i < instances.Length; i++)
{
if (instances[i] == null) return true;
}
return false;
}
public void DestroyInstances()
{
//Destroy any existing instances
for (int i = 0; i < instances.Length; i++)
{
DestroyInstance(instances[i]);
}
}
private static void DestroyInstance(Object obj)
{
#if UNITY_EDITOR
if (Application.isPlaying && !UnityEditor.EditorApplication.isPaused)
Destroy(obj);
else
DestroyImmediate(obj);
#else
Destroy(obj);
#endif
}
public void Respawn(int splineCount, Transform parent)
{
DestroyInstances();
//Nothing to spawn, clear out
if (prefab == null)
{
//Debug.Log("Cap has no prefab, clearing and bailing");
instances = Array.Empty<GameObject>();
return;
}
//One cap gets spawned per spline
instances = new GameObject[splineCount];
//Respawn the prefabs (once per spline)
for (int i = 0; i < instances.Length; i++)
{
GameObject instance = InstantiatePrefab(prefab);
instance.transform.SetParent(parent);
instances[i] = instance;
}
}
private GameObject InstantiatePrefab(Object source)
{
bool isPrefab = false;
#if UNITY_EDITOR
if (UnityEditor.PrefabUtility.GetPrefabAssetType(source) == PrefabAssetType.Variant)
{
//PrefabUtility.GetCorrespondingObjectFromSource still returns the base prefab. However, this does work.
isPrefab = source;
}
else
{
Object original = UnityEditor.PrefabUtility.GetCorrespondingObjectFromOriginalSource(source);
isPrefab = original;
//This is necessary if the source if a prefab already instantiate in the scene
if (isPrefab) source = original;
}
#endif
GameObject instance = null;
#if UNITY_EDITOR
if (isPrefab)
{
instance = UnityEditor.PrefabUtility.InstantiatePrefab(source) as GameObject;
}
#endif
//Non-prefabs and builds
if (!isPrefab)
{
instance = GameObject.Instantiate(source) as GameObject;
}
if (instance == null)
{
Debug.LogError($"Failed to spawn instance. Source is prefab: {isPrefab}");
}
return instance;
}
//Transforms the prefab to the desired spline position and rotation
public void ApplyTransform(SplineMesher splineMesher)
{
#if MATHEMATICS
for (int splineIndex = 0; splineIndex < instances.Length; splineIndex++)
{
Transform target = this.instances[splineIndex].transform;
//Coincidentally the two enum values correspond to 0 and 1
float t = (int)position;
float splineLength = splineMesher.splineContainer.Splines[splineIndex].CalculateLength(splineMesher.splineContainer.transform.localToWorldMatrix);
float shiftLength = shift;
if (position == Position.Start) shiftLength += splineMesher.settings.distribution.trimStart;
else if (position == Position.End) shiftLength += splineMesher.settings.distribution.trimEnd;
//Shift along spline by X-units
float tOffset = (shiftLength) / splineLength;
if (position == Cap.Position.End) tOffset = -tOffset;
t += tOffset;
//Ensure a tangent can always be derived at very the start and end
t = Mathf.Clamp(t, 0.0001f, 0.9999f);
splineMesher.splineContainer.Splines[splineIndex].Evaluate(t, out float3 splinePoint, out float3 tangent, out float3 up);
float3 forward = math.normalize(tangent);
float3 right = math.cross(forward, up);
//Rotation
Quaternion m_rotation = Quaternion.Euler(rotation);
if (align)
{
m_rotation = Quaternion.LookRotation(forward, up) * Quaternion.Euler(rotation);
m_rotation = splineMesher.SampleRollRotation(splineMesher.splineContainer.Splines[splineIndex], forward, t * splineLength, splineIndex) * m_rotation;
right = m_rotation * math.right();
up = m_rotation * math.up();
//Flipped?
if(position == Position.End || (position == Position.Start && scale.z < 0)) right = -right;
}
//Offset
splinePoint += right * (offset.x - splineMesher.settings.deforming.curveOffset.x);
splinePoint += up * (offset.y - splineMesher.settings.deforming.curveOffset.y);
splinePoint += forward * offset.z;
splinePoint.x += splineMesher.settings.deforming.pivotOffset.x;
splinePoint.y += splineMesher.settings.deforming.pivotOffset.y;
//Position of point on spline in world-space
splinePoint = splineMesher.splineContainer.transform.TransformPoint(splinePoint);
if (splineMesher.settings.conforming.enable)
{
if (SplineMeshGenerator.PerformConforming(splinePoint, splineMesher.settings.conforming, 1f, out float3 hitPosition, out float3 hitNormal))
{
splinePoint.y = hitPosition.y + offset.y;
quaternion hitRotation = quaternion.LookRotationSafe(tangent, hitNormal);
if (splineMesher.settings.conforming.align)
{
//m_rotation = hitRotation;
}
}
}
Vector3 m_scale = scale;
if (matchScale)
{
m_scale.x *= splineMesher.settings.deforming.scale.x;
m_scale.y *= splineMesher.settings.deforming.scale.y;
m_scale.z *= splineMesher.settings.deforming.scale.z;
float3 splineScale = splineMesher.SampleScale(t * splineLength, splineIndex);
m_scale.x *= splineScale.x;
m_scale.y *= splineScale.y;
}
target.localScale = m_scale;
target.SetPositionAndRotation(splinePoint, m_rotation);
//Gray out fields as any chances would be overwritten anyway
target.hideFlags = HideFlags.NotEditable;
//this.instances[splineIndex].hideFlags = hideInstances ? HideFlags.HideInHierarchy : HideFlags.None;
}
#endif
}
}
public Cap startCap = new Cap(Cap.Position.Start);
public Cap endCap = new Cap(Cap.Position.End);
#if SPLINES
/// <summary>
/// Updates the Transform of the start/end caps. Respawns them if necessary (ie. prefab changed)
/// </summary>
public partial void UpdateCaps()
{
if (!splineContainer) return;
var splineCountChanged = splineContainer.Splines.Count != splineCount;
//if(splineCountChanged) Debug.Log($"Spline count changed from {splineCount} to {splineContainer.Splines.Count}");
if (splineCountChanged || startCap.RequiresRespawn())
{
startCap.Respawn(splineCount, this.transform);
}
if (splineCountChanged || endCap.RequiresRespawn())
{
endCap.Respawn(splineCount, this.transform);
}
startCap.ApplyTransform(this);
endCap.ApplyTransform(this);
}
#endif
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: cfcf10a2fd2b4fd7a4ff01678149c974
timeCreated: 1724766181

View File

@ -0,0 +1,501 @@
// Staggart Creations (http://staggart.xyz)
// Copyright protected under Unity Asset Store EULA
// Copying or referencing source code for the production of new asset store, or public content, is strictly prohibited!
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
#if MATHEMATICS
using Unity.Mathematics;
#endif
#if SPLINES
using UnityEngine.Splines;
#endif
namespace sc.modeling.splines.runtime
{
public partial class SplineMesher
{
#if SPLINES
/// <summary>
/// Geometry will be created from splines within this container.
/// </summary>
public SplineContainer splineContainer;
[SerializeField] [ HideInInspector]
private int splineCount; //Change tracking
public enum SplineChangeReaction
{
During,
WhenDone,
}
[Tooltip("Determines when a change to the spline should be detected")]
public SplineChangeReaction splineChangeMode = SplineChangeReaction.During;
//[HideInInspector]
/// <summary>
/// Scale information for each spline within the container. <seealso cref="SampleScale(float,int)"/>
/// </summary>
public List<SplineData<float3>> scaleData = new List<SplineData<float3>>();
/// <summary>
/// Roll (angle in degrees) information for each spline within the container. <seealso cref="SampleRoll(float,int)"/>
/// </summary>
public List<SplineData<float>> rollData = new List<SplineData<float>>();
/// <summary>Structure to hold vertex color value for a specific location on the track.</summary>
[Serializable]
public struct VertexColorChannel
{
public float value;
public bool blend;
///<summary>Implicit conversion to float</summary>
public static implicit operator float(VertexColorChannel value) => value.value;
///<summary>Implicit conversion from float</summary>
public static implicit operator VertexColorChannel(float value) => new () { value = value };
public struct LerpVertexColorData : IInterpolator<VertexColorChannel>
{
//Represents the vertex color channel value of the original mesh
private readonly float baseValue;
public LerpVertexColorData(float baseValue)
{
this.baseValue = baseValue;
}
public VertexColorChannel Interpolate(VertexColorChannel a, VertexColorChannel b, float t)
{
//Values blending with base value
float aValue = BlendVertexColorChannel(a, baseValue);
float bValue = BlendVertexColorChannel(b, baseValue);
return Mathf.Lerp(aValue, bValue, t);
}
}
}
public List<SplineData<VertexColorChannel>> vertexColorRedData = new List<SplineData<VertexColorChannel>>();
public List<SplineData<VertexColorChannel>> vertexColorGreenData = new List<SplineData<VertexColorChannel>>();
public List<SplineData<VertexColorChannel>> vertexColorBlueData = new List<SplineData<VertexColorChannel>>();
public List<SplineData<VertexColorChannel>> vertexColorAlphaData = new List<SplineData<VertexColorChannel>>();
private static float BlendVertexColorChannel(VertexColorChannel data, float baseValue)
{
float output = baseValue;
if (data.blend)
{
output += data.value;
}
else
{
output = data.value;
}
return output;
}
private partial void SubscribeSplineCallbacks()
{
#if MATHEMATICS
SplineContainer.SplineAdded += OnSplineAdded;
SplineContainer.SplineRemoved += OnSplineRemoved;
Spline.Changed += OnSplineChanged;
#endif
}
private partial void UnsubscribeSplineCallbacks()
{
#if MATHEMATICS
SplineContainer.SplineAdded -= OnSplineAdded;
SplineContainer.SplineRemoved -= OnSplineRemoved;
Spline.Changed -= OnSplineChanged;
#endif
}
private Spline lastEditedSpline;
private int lastEditedSplineIndex = -1;
private void OnSplineChanged(Spline spline, int knotIndex, SplineModification modificationType)
{
if (!splineContainer) return;
if (rebuildTriggers.HasFlag(RebuildTriggers.OnSplineChanged) == false) return;
//Spline belongs to the assigned container?
var splineIndex = Array.IndexOf(splineContainer.Splines.ToArray(), spline);
if (splineIndex < 0)
return;
splineCount = splineContainer.Splines.Count;
lastEditedSpline = spline;
lastEditedSplineIndex = splineIndex;
if (splineChangeMode == SplineChangeReaction.WhenDone)
{
lastChangeTime = Time.realtimeSinceStartup;
if (Application.isPlaying)
{
//Coroutines only work in play mode and builds
//Cancel any existing debounce coroutine
if (debounceCoroutine != null) StopCoroutine(debounceCoroutine);
debounceCoroutine = StartCoroutine(DebounceCoroutine());
}
else
{
if (!isTrackingChanges)
{
isTrackingChanges = true;
#if UNITY_EDITOR
UnityEditor.EditorApplication.update += EditorUpdate;
#endif
}
}
}
else if (splineChangeMode == SplineChangeReaction.During)
{
ExecuteAfterSplineChanges();
}
}
public float debounceTime = 0.1f;
private float lastChangeTime = -1f;
private bool isTrackingChanges = false;
private void EditorUpdate()
{
if (isTrackingChanges && Time.realtimeSinceStartup - lastChangeTime >= debounceTime)
{
ExecuteAfterSplineChanges();
isTrackingChanges = false;
#if UNITY_EDITOR
UnityEditor.EditorApplication.update -= EditorUpdate;
#endif
}
}
private Coroutine debounceCoroutine;
private IEnumerator DebounceCoroutine()
{
yield return new WaitForSeconds(debounceTime);
ExecuteAfterSplineChanges();
}
private void ExecuteAfterSplineChanges()
{
if(lastEditedSplineIndex < 0) return;
Rebuild();
UpdateCaps();
}
private void OnSplineAdded(SplineContainer container, int index)
{
if (!splineContainer) return;
if (rebuildTriggers.HasFlag(RebuildTriggers.OnSplineAdded) == false) return;
if (container.GetHashCode() != splineContainer.GetHashCode())
return;
splineCount = splineContainer.Splines.Count;
Rebuild();
}
private void OnSplineRemoved(SplineContainer container, int index)
{
if (!splineContainer) return;
if (rebuildTriggers.HasFlag(RebuildTriggers.OnSplineRemoved) == false) return;
if (container != splineContainer)
return;
splineCount = splineContainer.Splines.Count;
#if UNITY_EDITOR
UnityEditor.Undo.RecordObject(this, "Deleting Spline Mesh data");
#endif
if (index < scaleData.Count) scaleData.RemoveAt(index);
if (index < rollData.Count) rollData.RemoveAt(index);
if (index < vertexColorRedData.Count) vertexColorRedData.RemoveAt(index);
if (index < vertexColorGreenData.Count) vertexColorGreenData.RemoveAt(index);
if (index < vertexColorBlueData.Count) vertexColorBlueData.RemoveAt(index);
if (index < vertexColorAlphaData.Count) vertexColorAlphaData.RemoveAt(index);
Rebuild();
}
/// <summary>
/// Clears the scale data for every spline. If no scale data is found for a spline, a default value is used.
/// </summary>
public void ResetScaleData()
{
if (!splineContainer) return;
scaleData.Clear();
ValidateData();
Rebuild();
}
/// <summary>
/// Clears the roll data for every spline.
/// </summary>
public void ResetRollData()
{
if (!splineContainer) return;
rollData.Clear();
ValidateData();
Rebuild();
}
/// <summary>
/// Clears the roll data for every spline.
/// </summary>
public void ResetVertexColorData()
{
if (!splineContainer) return;
vertexColorRedData.Clear();
vertexColorGreenData.Clear();
vertexColorBlueData.Clear();
vertexColorAlphaData.Clear();
ValidateData();
Rebuild();
}
public void ReverseSpline()
{
if (!splineContainer) return;
for (int s = 0; s < splineContainer.Splines.Count; s++)
{
SplineUtility.ReverseFlow(splineContainer.Splines[s]);
}
}
//It is important to ensure that for every spline in the container a data set is present.
//Subsequently, changes to the path index unit also require conversion
public void ValidateData()
{
if (!splineContainer) return;
#if MATHEMATICS
splineCount = splineContainer.Splines.Count;
ValidateScaleData();
ValidateRollData();
ValidateVertexColorData(ref vertexColorRedData);
ValidateVertexColorData(ref vertexColorGreenData);
ValidateVertexColorData(ref vertexColorBlueData);
ValidateVertexColorData(ref vertexColorAlphaData);
#endif
}
private void ValidateScaleData()
{
if (scaleData.Count < splineCount)
{
var delta = splineCount - scaleData.Count;
for (var i = 0; i < delta; i++)
{
#if UNITY_EDITOR
UnityEditor.Undo.RecordObject(this, "Modifying Spline Mesh Scale");
#endif
//float length = container.Splines[i].CalculateLength(container.transform.localToWorldMatrix);
SplineData<float3> data = new SplineData<float3>();
data.DefaultValue = Vector3.one;
data.PathIndexUnit = settings.deforming.scalePathIndexUnit;
scaleData.Add(data);
}
}
//One for every spline
for (int j = 0; j < scaleData.Count; j++)
{
//Index unit has changed, convert the index value
if (scaleData[j].PathIndexUnit != settings.deforming.scalePathIndexUnit)
{
//Debug.Log($"Scale index unit changed from {scaleData[j].PathIndexUnit} to {settings.deforming.scalePathIndexUnit}");
ConvertIndexUnit(splineContainer.Splines[j], ref scaleData, j, settings.deforming.scalePathIndexUnit);
}
}
}
private void ValidateRollData()
{
if (rollData.Count < splineCount)
{
var delta = splineCount - rollData.Count;
for (var i = 0; i < delta; i++)
{
#if UNITY_EDITOR
UnityEditor.Undo.RecordObject(this, "Modifying Spline Mesh Roll");
#endif
SplineData<float> data = new SplineData<float>();
data.DefaultValue = 0f;
data.PathIndexUnit = settings.deforming.rollPathIndexUnit;
rollData.Add(data);
}
}
//One for every spline
for (int j = 0; j < rollData.Count; j++)
{
//Index unit has changed, convert the index value
if (rollData[j].PathIndexUnit != settings.deforming.rollPathIndexUnit)
{
ConvertIndexUnit(splineContainer.Splines[j], ref rollData, j, settings.deforming.rollPathIndexUnit);
}
}
}
private void ConvertIndexUnit<T>(ISpline spline, ref List<SplineData<T>> data, int index, PathIndexUnit targetUnit)
{
//Data points
for (int i = 0; i < data[index].Count; i++)
{
data[index].ConvertPathUnit(spline, targetUnit);
}
//Set to new index unit
data[index].PathIndexUnit = targetUnit;
}
private void ValidateVertexColorData(ref List<SplineData<VertexColorChannel>> channel)
{
var delta = splineCount - channel.Count;
for (var i = 0; i < delta; i++)
{
#if UNITY_EDITOR
UnityEditor.Undo.RecordObject(this, "Modifying Spline Mesh Vertex Color");
#endif
SplineData<VertexColorChannel> data = new SplineData<VertexColorChannel>();
VertexColorChannel dataPoint = new VertexColorChannel();
dataPoint.value = 0f;
dataPoint.blend = true;
data.DefaultValue = dataPoint;
data.PathIndexUnit = settings.color.pathIndexUnit;
channel.Add(data);
}
//One for every spline
for (int j = 0; j < channel.Count; j++)
{
//Index unit has changed, convert the index value
if (channel[j].PathIndexUnit != settings.color.pathIndexUnit)
{
ConvertIndexUnit(splineContainer.Splines[j], ref channel, j, settings.color.pathIndexUnit);
}
}
}
#region Public API
#if SPLINES && MATHEMATICS
/// <summary>
/// Sample the mesh scale data on the spline. If no data is present, a default scale of (1,1,1) is returned.
/// </summary>
/// <param name="distance">The distance along the spline curve</param>
/// <param name="splineIndex">Spline index number</param>
/// <returns></returns>
public float3 SampleScale(float distance, int splineIndex)
{
float3 splineScale = 1f;
if (scaleData != null)
{
if (scaleData[splineIndex].Count > 0)
{
splineScale = scaleData[splineIndex].Evaluate(splineContainer.Splines[splineIndex], distance, scaleData[splineIndex].PathIndexUnit, SplineMeshGenerator.Float3Interpolator);
}
}
return splineScale;
}
public Quaternion SampleRollRotation(ISpline spline, Vector3 forward, float distance, int splineIndex)
{
float rollFrequency = settings.deforming.rollFrequency > 0 ? settings.deforming.rollFrequency * (distance) : 1f;
float rollAngle = settings.deforming.rollAngle;
float rollValue = rollAngle * rollFrequency;
if (rollData != null)
{
if (rollData[splineIndex].Count > 0)
{
rollValue += rollData[splineIndex].Evaluate(spline, splineContainer.Splines[splineIndex].ConvertIndexUnit(distance, PathIndexUnit.Distance, settings.deforming.rollPathIndexUnit), settings.deforming.rollPathIndexUnit, SplineMeshGenerator.FloatInterpolator);
}
}
return Quaternion.AngleAxis(-rollValue, forward);
}
/// <summary>
/// Given a world-space position, attempt to find the nearest point on the spline, then sample the mesh scale data there.
/// If all fails, a default scale of (1,1,1) is returned.
/// </summary>
/// <param name="worldPosition"></param>
/// <returns></returns>
public float3 SampleScale(Vector3 worldPosition)
{
Vector3 localPosition = splineContainer.transform.InverseTransformPoint(worldPosition);
//Unclear how one would find the nearest spline, so default to the first
int splineIndex = 0;
//Find the position on the spline that's nearest to the box's center
SplineUtility.GetNearestPoint(splineContainer.Splines[splineIndex], localPosition, out var nearestPoint, out float t, SplineUtility.PickResolutionMin, 2);
//Convert the normalized t-index to the distances on the spline
float distance = splineContainer.Splines[splineIndex].ConvertIndexUnit(t, PathIndexUnit.Normalized, scaleData[splineIndex].PathIndexUnit);
return SampleScale(distance, splineIndex);
}
#endif
#endregion
[Obsolete("Use the native SplineUtility.FitSplineToPoints function instead.")]
public void CreateSplineFromPoints(Vector3[] positions, bool smooth) { }
#endif //SPLINES
}
}

View File

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 74a36790311a496c80747baf9c2abc5a
timeCreated: 1711010726

View File

@ -0,0 +1,372 @@
// Staggart Creations (http://staggart.xyz)
// Copyright protected under Unity Asset Store EULA
// Copying or referencing source code for the production of new asset store, or public content, is strictly prohibited!
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Profiling;
#if MATHEMATICS
using Unity.Mathematics;
#endif
#if SPLINES
using UnityEngine.Splines;
#endif
namespace sc.modeling.splines.runtime
{
[ExecuteInEditMode]
[AddComponentMenu("Splines/Spline Mesher")]
[HelpURL("https://staggart.xyz/sm-docs/")]
[Icon(SplineMesher.kPackageRoot + "/Editor/Resources/spline-mesher-icon-64px.psd")]
[SelectionBase] //Select this object when selecting caps (child objects)
public partial class SplineMesher : MonoBehaviour
{
public const string VERSION = "1.2.2";
public const string kPackageRoot = "Packages/com.staggartcreations.splinemesher";
/// <summary>
/// The input mesh to be used for mesh generation
/// </summary>
public Mesh sourceMesh;
[Tooltip("The axis of the mesh that's considered to its forward direction." +
"\n\nConventionally, the Z-axis is forward. If you have to change this it's strongly recommend to fix the mesh's orientation instead!")]
public Vector3 rotation;
/// <summary>
/// The output GameObject to which a <see cref="MeshFilter"/> component may be added. The output mesh will be assigned here.
/// </summary>
[Tooltip("The GameObject to which a Mesh Filter component may be added. The output mesh will be assigned here.")]
public GameObject outputObject;
[Obsolete("Set the Rebuild Trigger flag \"On Start\" instead", false)]
public bool rebuildOnStart;
[Flags]
public enum RebuildTriggers
{
[InspectorName("Via scripting")]
None = 0,
[InspectorName("On Spline Change")]
OnSplineChanged = 1,
OnSplineAdded = 2,
OnSplineRemoved = 4,
[InspectorName("On Start()")]
OnStart = 8,
OnUIChange = 16
}
[Tooltip("Control which sort of events cause the mesh to be regenerated." +
"\n\n" +
"For instance when the spline changes (default), or on the component's Start() function." +
"\n\n" +
"If none are selected you need to call the Rebuild() function through script.")]
public RebuildTriggers rebuildTriggers = RebuildTriggers.OnSplineAdded | RebuildTriggers.OnSplineRemoved | RebuildTriggers.OnSplineChanged | RebuildTriggers.OnUIChange;
[SerializeField]
private MeshCollider meshCollider;
/// <summary>
/// Settings used for mesh generation
/// </summary>
public Settings settings = new Settings();
#pragma warning disable CS0067
public delegate void Action(SplineMesher instance);
/// <summary>
/// Pre- and post-build callbacks. The instance being passed is the Spline Mesher being rebuild.
/// </summary>
public static event Action onPreRebuildMesh, onPostRebuildMesh;
/// <summary>
/// UnityEvent for a GameObject's function to be executed when river is rebuild. This is exposed in the inspector.
/// </summary>
[Serializable]
public class RebuildEvent : UnityEvent { }
/// <summary>
/// UnityEvent, fires whenever the spline is rebuild (eg. editing nodes) or parameters are changed
/// </summary>
[HideInInspector]
public RebuildEvent onPreRebuild, onPostRebuild;
#pragma warning restore CS0067
[SerializeField]
[UnityEngine.Serialization.FormerlySerializedAs("meshFilter")]
private MeshFilter m_meshFilter;
/// <summary>
/// The MeshFilter component added to the output GameObject
/// </summary>
public MeshFilter meshFilter
{
private set => m_meshFilter = value;
get => m_meshFilter;
}
private void Reset()
{
meshFilter = GetComponent<MeshFilter>();
if (meshFilter)
{
outputObject = meshFilter.gameObject;
#if UNITY_EDITOR
//If the mesh is saved to disk, consider it a viable source mesh
if (UnityEditor.EditorUtility.IsPersistent(meshFilter.sharedMesh))
{
sourceMesh = meshFilter.sharedMesh;
}
#endif
}
#if SPLINES
splineContainer = GetComponentInParent<SplineContainer>();
#endif
}
private void Start()
{
//In this case the component was likely copied somewhere, or prefabbed. Mesh data will have been lost, so regenerating it is an alternative
if (rebuildTriggers.HasFlag(RebuildTriggers.OnStart)) Rebuild();
}
private void OnEnable()
{
#if SPLINES
SubscribeSplineCallbacks();
#endif
}
private void OnDisable()
{
#if SPLINES
UnsubscribeSplineCallbacks();
#endif
}
#if SPLINES
private partial void SubscribeSplineCallbacks();
private partial void UnsubscribeSplineCallbacks();
public partial void UpdateCaps();
#endif
#if UNITY_EDITOR
private readonly System.Diagnostics.Stopwatch rebuildTimer = new System.Diagnostics.Stopwatch();
#endif
/// <summary>
/// Checks for the presence of a <see cref="MeshFilter"/> and <see cref="MeshRenderer"/> component on the assigned output object. Added if missing
/// </summary>
public void ValidateOutput()
{
if (!outputObject) return;
//Note: Targeting a specific GameObject, rather than a MeshFilter directly.
//This makes it easier to add support for multiple output meshes, or LOD Groups, which involves adding components or child objects
if (!meshFilter) meshFilter = outputObject.GetComponent<MeshFilter>();
if (!meshFilter)
{
meshFilter = outputObject.AddComponent<MeshFilter>();
MeshRenderer meshRenderer = outputObject.GetComponent<MeshRenderer>();
if (meshRenderer == false)
{
meshRenderer = outputObject.AddComponent<MeshRenderer>();
}
}
}
private Mesh inputMesh;
/// <summary>
/// Regenerates the output mesh for all the splines within the assigned <see cref="SplineContainer"/>. Also recreates the collision mesh.
/// </summary>
public void Rebuild()
{
#if SPLINES && MATHEMATICS
if (!splineContainer) return;
if (!outputObject) return;
var createMesh = !(settings.collision.enable && settings.collision.colliderOnly);
meshFilter = outputObject.GetComponent<MeshFilter>();
if (createMesh)
{
if (!meshFilter) return;
}
onPreRebuildMesh?.Invoke(this);
onPreRebuild?.Invoke();
Profiler.BeginSample("Spline Mesher: Rebuild", this);
ValidateData();
#if UNITY_EDITOR
rebuildTimer.Reset();
rebuildTimer.Start();
#endif
if (sourceMesh)
{
if (Application.isPlaying && sourceMesh.isReadable == false)
{
throw new Exception($"[Spline Mesher] To use this at runtime, the mesh \"{sourceMesh.name}\" requires the Read/Write option enabled in its import settings. For procedurally created geometry, use \"Mesh.UploadMeshData(false)\"");
}
inputMesh = SplineMeshGenerator.TransformMesh(sourceMesh, rotation, settings.deforming.scale.x < 0, settings.deforming.scale.y < 0);
}
else
{
#if UNITY_EDITOR
rebuildTimer.Stop();
#endif
return;
}
if (createMesh)
{
//Avoid self-collision
var collision = settings.collision.enable && meshCollider;
if (collision) meshCollider.enabled = false;
Profiler.BeginSample("Spline Mesher: Create Mesh", this);
meshFilter.sharedMesh = SplineMeshGenerator.CreateMesh(splineContainer, inputMesh, outputObject.transform.worldToLocalMatrix, settings, scaleData, rollData,
vertexColorRedData, vertexColorGreenData, vertexColorBlueData, vertexColorAlphaData);
Profiler.EndSample();
if (collision) meshCollider.enabled = true;
}
else
{
//Clear
if(meshFilter && meshFilter.sharedMesh) meshFilter.sharedMesh = null;
}
CreateCollider();
#if UNITY_EDITOR
rebuildTimer.Stop();
#endif
Profiler.EndSample();
onPostRebuildMesh?.Invoke(this);
onPostRebuild?.Invoke();
#endif
}
/// <summary>
/// Returns the build time, in milliseconds, of the last rebuild operation
/// </summary>
/// <returns></returns>
public float GetLastRebuildTime()
{
#if UNITY_EDITOR
return rebuildTimer.ElapsedMilliseconds;
#else
return 0;
#endif
}
private void CreateCollider()
{
#if SPLINES && MATHEMATICS
if (!splineContainer) return;
if (settings.collision.enable)
{
if (!meshCollider) meshCollider = outputObject.GetComponent<MeshCollider>();
if (!meshCollider) meshCollider = outputObject.AddComponent<MeshCollider>();
var m_collisionMesh = settings.collision.collisionMesh;
if (settings.collision.type == Settings.ColliderType.Box)
{
m_collisionMesh = SplineMeshGenerator.CreateBoundsMesh(inputMesh, settings.collision.boxSubdivisions);
}
else
{
if (settings.collision.collisionMesh)
{
m_collisionMesh = SplineMeshGenerator.TransformMesh(settings.collision.collisionMesh, rotation, settings.deforming.scale.x < 0, settings.deforming.scale.y < 0);
}
}
if (m_collisionMesh)
{
//Skip cleaning of degenerate triangles
//meshCollider.cookingOptions = MeshColliderCookingOptions.None;
//If the visual mesh and collision mesh are identical, simply use that
if (m_collisionMesh.GetHashCode() == sourceMesh.GetHashCode())
{
meshCollider.sharedMesh = meshFilter.sharedMesh;
}
else
{
meshCollider.sharedMesh = null; //Avoid self-collision with raycasts
//float spacing = settings.distribution.spacing;
//settings.distribution.spacing = 0f;
meshCollider.sharedMesh = SplineMeshGenerator.CreateMesh(splineContainer, m_collisionMesh, meshCollider.transform.worldToLocalMatrix, settings, scaleData, rollData);
//settings.distribution.spacing = spacing;
meshCollider.sharedMesh.name += " Collider";
}
}
else
{
meshCollider.sharedMesh = null;
}
}
else if(meshCollider)
{
DestroyImmediate(meshCollider);
}
#endif
}
[SerializeField] [HideInInspector]
private Vector3 prevSplinePosition;
[SerializeField] [HideInInspector]
private Quaternion prevSplineRotation;
[SerializeField] [HideInInspector]
private Vector3 prevSplineScale;
private void OnDrawGizmosSelected()
{
#if SPLINES && MATHEMATICS
if (splineContainer && Time.frameCount % 2 == 0)
{
if (rebuildTriggers.HasFlag(RebuildTriggers.OnSplineChanged))
{
Transform splineTransform = splineContainer.transform;
var hasChanged = false;
hasChanged |= (prevSplinePosition != splineTransform.position);
hasChanged |= (prevSplineRotation != splineTransform.rotation);
hasChanged |= (prevSplineScale != splineTransform.lossyScale);
if (hasChanged)
{
prevSplinePosition = splineTransform.position;
prevSplineRotation = splineTransform.rotation;
prevSplineScale = splineTransform.lossyScale;
Rebuild();
}
}
}
#endif
}
}
}

View File

@ -0,0 +1,17 @@
fileFormatVersion: 2
guid: 9b7e501cc04647c88b1198192f3931e0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- sourceMesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
- outputObject: {instanceID: 0}
- collisionMesh: {instanceID: 0}
- meshCollider: {instanceID: 0}
- m_meshFilter: {instanceID: 0}
- splineContainer: {instanceID: 0}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 15108bd42fa174941926f49d9a1fcaa2
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
ProjectNLD/Assets/ThirdParty/SplineMesher/_Demo/DemoShapes.fbx (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@ -0,0 +1,109 @@
fileFormatVersion: 2
guid: 3714190a8eb8bab4f81dedbbaf609211
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 0
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 3
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 0
importPhysicalCameras: 1
importVisibility: 0
importBlendShapes: 0
importCameras: 0
importLights: 0
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 1
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 0
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 180
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 0
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 1
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 0
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,109 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &9147115300379874623
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1230861882261655085}
- component: {fileID: 4424282607632582697}
- component: {fileID: 824492776962895786}
- component: {fileID: 9149615591243127121}
m_Layer: 0
m_Name: Guardrail_Cap
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1230861882261655085
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9147115300379874623}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4424282607632582697
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9147115300379874623}
m_Mesh: {fileID: -1897382313256463254, guid: 3714190a8eb8bab4f81dedbbaf609211, type: 3}
--- !u!23 &824492776962895786
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9147115300379874623}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 32ced7432f808a344877070676f01f69, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!136 &9149615591243127121
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9147115300379874623}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.2619539
m_Height: 0.94
m_Direction: 1
m_Center: {x: -0.33995044, y: 0.64377254, z: -0.06508404}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 96b5a8627f086194b8bbc0b4f9588d70
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,107 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &9147115300379874623
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1230861882261655085}
- component: {fileID: 4424282607632582697}
- component: {fileID: 824492776962895786}
- component: {fileID: 4407746447511163291}
m_Layer: 0
m_Name: Guardrail_End
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1230861882261655085
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9147115300379874623}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &4424282607632582697
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9147115300379874623}
m_Mesh: {fileID: -2044157420750999907, guid: 3714190a8eb8bab4f81dedbbaf609211, type: 3}
--- !u!23 &824492776962895786
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9147115300379874623}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: cb349b7ff9a8307409429109b80518d4, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!65 &4407746447511163291
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9147115300379874623}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.4326691, y: 0.92343926, z: 0.9262614}
m_Center: {x: -0.14133456, y: 0.46171963, z: 0.46312916}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: a38a3d6d474098847804db256f46d4a6
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 609faf3a0f2d67b47ab25698a62fba7c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,86 @@
%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: BarbedWire
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ALPHATEST_ON
- _NORMALMAP
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2450
stringTagMap:
RenderType: TransparentCutout
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 2800000, guid: 378ba36f585dcc344bb91119899424ea, type: 3}
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: 2}
m_Offset: {x: 0, y: 0.61}
- _MainTex:
m_Texture: {fileID: 2800000, guid: cf431a357c0b4944f97dcd91bf66d39a, type: 3}
m_Scale: {x: 1, y: 2}
m_Offset: {x: 0, y: 0.61}
- _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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.333
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 1
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d2204a7a99d85d149a340cb593fd1ed9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,83 @@
%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: BaseMaterial
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: 0}
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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9be51cc149b840c45ac055f7ff5a13ec
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,164 @@
%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: Bunting
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _NORMALMAP
m_InvalidKeywords:
- _BUILTIN_ALPHATEST_ON
- _BUILTIN_AlphaClip
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: b856c8e1b120bb7468ed5c62c21b369f, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 2800000, guid: 30593b7de6210614da59f3617dfeba93, type: 3}
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: b856c8e1b120bb7468ed5c62c21b369f, 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:
- _AlphaClip: 0
- _AlphaToMask: 0
- _BUILTIN_AlphaClip: 1
- _BUILTIN_Blend: 0
- _BUILTIN_CullMode: 0
- _BUILTIN_DstBlend: 0
- _BUILTIN_QueueControl: 0
- _BUILTIN_QueueOffset: 0
- _BUILTIN_SrcBlend: 1
- _BUILTIN_Surface: 0
- _BUILTIN_ZTest: 4
- _BUILTIN_ZWrite: 1
- _BUILTIN_ZWriteControl: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _CastShadows: 1
- _Cull: 0
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.912
- _GlossyReflections: 1
- _Mask_Noise_By_Vertical_UV: 1
- _Metallic: 0
- _Mode: 0
- _Noise_Frequency: 32
- _Noise_Speed: 5
- _Noise_Strength: 0.05
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueControl: 1
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.957
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _Speed: 3
- _SrcBlend: 1
- _Strength: 0.2
- _Surface: 0
- _Swing_Speed: 2
- _Swing_Strength: 0.2
- _UVSec: 0
- _WorkflowMode: 1
- _ZTest: 4
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Noise_Frequency: {r: 10, g: 10, b: 0, a: 0}
- _Noise_Speed: {r: 10, g: 1, b: 0, a: 0}
- _Noise_Strength: {r: 0.16, g: 1, b: 0, a: 0}
m_BuildTextureStacks: []
--- !u!114 &3206965421409699452
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: 7
--- !u!114 &6435209682433006741
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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f5663507c6d31a440b95730ad1124775
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,86 @@
%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: Chain
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ALPHATEST_ON
- _NORMALMAP
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2450
stringTagMap:
RenderType: TransparentCutout
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 2800000, guid: 7f34295084d7f9840968c6e370e36d4a, type: 3}
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: 7b0c9f3a2ef1c6243acdd638e43c20dc, 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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.333
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 1
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 81e327cf4993b474ba45193e71f2c034
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,83 @@
%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: Checkers
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: 200, y: 200}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: feb046db34f4d424f86ecd4c04a85f0a, type: 3}
m_Scale: {x: 200, y: 200}
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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 983fc32735ebca145ac381c71ca06c2d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,83 @@
%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: GuardrailCap
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: eea1601c404f6aa40bce6d991c617c18, 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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.604
- _GlossyReflections: 1
- _Metallic: 1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 32ced7432f808a344877070676f01f69
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,90 @@
%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: HDRI
m_Shader: {fileID: 103, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: 0}
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}
- _Tex:
m_Texture: {fileID: 8900000, guid: 2301f5d4ff0d35b488c3b8340c9ae05b, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Exposure: 1
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Rotation: 0
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Tint: {r: 0.5019608, g: 0.5019608, b: 0.5019608, a: 0.5}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b8f2cf3a0dce1e9468bce5e3bd9670cf
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,83 @@
%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: Pipe
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: 0}
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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.671
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 0.53819865, b: 0.23113209, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 25dc187b0048adb4792b129882ffc80b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,163 @@
%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: PrayerFlags
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords:
- _BUILTIN_ALPHATEST_ON
- _BUILTIN_AlphaClip
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: b856c8e1b120bb7468ed5c62c21b369f, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _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: 9ea911b2e5e5c034e962ca4ac71854d4, 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:
- _AlphaClip: 0
- _AlphaToMask: 0
- _BUILTIN_AlphaClip: 1
- _BUILTIN_Blend: 0
- _BUILTIN_CullMode: 0
- _BUILTIN_DstBlend: 0
- _BUILTIN_QueueControl: 0
- _BUILTIN_QueueOffset: 0
- _BUILTIN_SrcBlend: 1
- _BUILTIN_Surface: 0
- _BUILTIN_ZTest: 4
- _BUILTIN_ZWrite: 1
- _BUILTIN_ZWriteControl: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _CastShadows: 1
- _Cull: 0
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.061
- _GlossyReflections: 1
- _Mask_Noise_By_Vertical_UV: 1
- _Metallic: 0
- _Mode: 0
- _Noise_Frequency: 32
- _Noise_Speed: 5
- _Noise_Strength: 0.05
- _OcclusionStrength: 1
- _Parallax: 0.02
- _QueueControl: 1
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.957
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _Speed: 3
- _SrcBlend: 1
- _Strength: 0.2
- _Surface: 0
- _Swing_Speed: 2
- _Swing_Strength: 0.2
- _UVSec: 0
- _WorkflowMode: 1
- _ZTest: 4
- _ZWrite: 1
- _ZWriteControl: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _Noise_Frequency: {r: 10, g: 10, b: 0, a: 0}
- _Noise_Speed: {r: 10, g: 1, b: 0, a: 0}
- _Noise_Strength: {r: 0.16, g: 1, b: 0, a: 0}
m_BuildTextureStacks: []
--- !u!114 &3206965421409699452
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: 7
--- !u!114 &6435209682433006741
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

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d8aac7adb58b558428a76b2072cd005e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,83 @@
%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: RacetrackCurb
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: 2f7da820487e5f240b6d4b5bb73a8759, 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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.122
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7324fd1372e84d94cbc4460e8f2a4dff
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,83 @@
%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: Rails
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: 0}
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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.604
- _GlossyReflections: 1
- _Metallic: 1
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0.6603774, g: 0.6603774, b: 0.6603774, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cb349b7ff9a8307409429109b80518d4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,83 @@
%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: Road
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: 5df0ca6f24247584ea4063679275b406, 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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.122
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 268cfed989f84684fb2f83244c4605af
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,83 @@
%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: Rollercoaster
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
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: 0}
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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.404
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 0, g: 0.5004747, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 02da40a178b884e4faed67834caa85e0
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,86 @@
%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: Rope
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _ALPHATEST_ON
- _NORMALMAP
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 2450
stringTagMap:
RenderType: TransparentCutout
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 2800000, guid: f8f534a69ccc58948b16f360e91dc746, type: 3}
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: 4703e495b7583804a890f7aae2889562, 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}
m_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.333
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 1
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
m_BuildTextureStacks: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 39573a100531e1446b3150598e5bb5c4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 97ee4615b7523c04ebf641f4c2cfec2c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: cf431a357c0b4944f97dcd91bf66d39a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 378ba36f585dcc344bb91119899424ea
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
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
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: b856c8e1b120bb7468ed5c62c21b369f
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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: 1
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: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 30593b7de6210614da59f3617dfeba93
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
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: 1
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
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 7b0c9f3a2ef1c6243acdd638e43c20dc
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 7f34295084d7f9840968c6e370e36d4a
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
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
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: eea1601c404f6aa40bce6d991c617c18
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 2301f5d4ff0d35b488c3b8340c9ae05b
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
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
spriteTessellationDetail: -1
textureType: 0
textureShape: 2
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 9ea911b2e5e5c034e962ca4ac71854d4
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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: 1
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: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 2f7da820487e5f240b6d4b5bb73a8759
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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: 3
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
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,114 @@
fileFormatVersion: 2
guid: 5df0ca6f24247584ea4063679275b406
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
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: 4
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
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
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: 3
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
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

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