mirror of
https://github.com/imperialsushi/gutterball-3.git
synced 2025-06-15 05:07:42 +00:00
New Version 1.42
Moving cam replay. Fixed the bugs. New Version 1.42 Moving cam replay. Fixed the bugs. New Version 1.42 Moving cam replay, Fixed the bugs.
This commit is contained in:
parent
dcb7df5fd1
commit
1c033119df
7079 changed files with 186851 additions and 48991 deletions
|
@ -0,0 +1,49 @@
|
|||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
|
||||
|
||||
namespace TMPro.EditorUtilities
|
||||
{
|
||||
|
||||
public static class TMP_StyleAssetMenu
|
||||
{
|
||||
|
||||
[MenuItem("Assets/Create/TextMeshPro/Style Sheet", false, 120)]
|
||||
public static void CreateTextMeshProObjectPerform()
|
||||
{
|
||||
string filePath;
|
||||
if (Selection.assetGUIDs.Length == 0)
|
||||
{
|
||||
// No asset selected.
|
||||
filePath = "Assets";
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get the path of the selected folder or asset.
|
||||
filePath = AssetDatabase.GUIDToAssetPath(Selection.assetGUIDs[0]);
|
||||
|
||||
// Get the file extension of the selected asset as it might need to be removed.
|
||||
string fileExtension = Path.GetExtension(filePath);
|
||||
if (fileExtension != "")
|
||||
{
|
||||
filePath = Path.GetDirectoryName(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
string filePathWithName = AssetDatabase.GenerateUniqueAssetPath(filePath + "/TMP StyleSheet.asset");
|
||||
|
||||
//// Create new Style Sheet Asset.
|
||||
TMP_StyleSheet styleSheet = ScriptableObject.CreateInstance<TMP_StyleSheet>();
|
||||
|
||||
AssetDatabase.CreateAsset(styleSheet, filePathWithName);
|
||||
|
||||
EditorUtility.SetDirty(styleSheet);
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue