Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.1.0] - 2017-11-14
### Added
- New menu option added to Import Examples and additional content like Font Assets, Materials Presets, etc for TextMesh Pro. This new menu option is located in "Window -> TextMeshPro -> Import Examples and Extra Content".
- New menu option added to Convert existing project files and assets created with either the Source Code or DLL only version of TextMesh Pro. Please be sure to backup your project before using this option. The new menu option is located in "Window -> TextMeshPro -> Convert TMP Project Files to UPM".
- Added Assembly Definitions for the TMP Runtime and Editor scripts.
- Added support for the UI DirtyLayoutCallback, DirtyVerticesCallback and DirtyMaterialCallback.
  • Loading branch information
Unity Technologies committed Apr 3, 2019
1 parent 85ff006 commit 9569234
Show file tree
Hide file tree
Showing 103 changed files with 1,466 additions and 1,735 deletions.
11 changes: 3 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
# Changelog
This is the first release of the TextMesh Pro UPM package. This release is based on the latest release of TextMesh Pro which is 1.0.55.xx.0b12.
This is the release of the TextMesh Pro UPM package. The initial release of this package which is version v1.0.1 was based on the latest release of TextMesh Pro which is 1.0.55.xx.0b12.

See the following link for the Release Notes for version 1.0.55.xx.0b12 of TextMesh Pro. http://digitalnativestudios.com/forum/index.php?topic=1363.0

## [1.0.60] - 2017-11-14
## [1.1.0] - 2017-11-14
### Added
- New menu option added to Import Examples and additional content like Font Assets, Materials Presets, etc for TextMesh Pro. This new menu option is located in "Window -> TextMeshPro -> Import Examples and Extra Content".
- New menu option added to Convert existing project files and assets created with either the Source Code or DLL only version of TextMesh Pro. Please be sure to backup your project before using this option. The new menu option is located in "Window -> TextMeshPro -> Convert TMP Project Files to UPM".
- Added Assembly Definitions for the TMP Runtime and Editor scripts.

### Fixed
-



- Added support for the UI DirtyLayoutCallback, DirtyVerticesCallback and DirtyMaterialCallback.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
24 changes: 0 additions & 24 deletions QAReport.md

This file was deleted.

7 changes: 0 additions & 7 deletions QAReport.md.meta

This file was deleted.

96 changes: 96 additions & 0 deletions Scripts/Editor/EditorCoroutine.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;


namespace TMPro.EditorUtilities
{
/// <summary>
/// Simple implementation of coroutine working in the Unity Editor.
/// </summary>
public class EditorCoroutine
{
private static Dictionary<int, EditorCoroutine> s_ActiveCoroutines;

readonly IEnumerator coroutine;

/// <summary>
/// Constructor
/// </summary>
/// <param name="routine"></param>
EditorCoroutine(IEnumerator routine)
{
this.coroutine = routine;
}


/// <summary>
/// Starts a new EditorCoroutine.
/// </summary>
/// <param name="newCoroutine">Coroutine</param>
/// <returns>new EditorCoroutine</returns>
public static EditorCoroutine StartCoroutine(IEnumerator routine)
{
EditorCoroutine coroutine = new EditorCoroutine(routine);
coroutine.Start();

// Add coroutine to tracking list
//if (s_ActiveCoroutines == null)
// s_ActiveCoroutines = new Dictionary<int, EditorCoroutine>();

// Add new instance of editor coroutine to dictionary.
//s_ActiveCoroutines.Add(coroutine.GetHashCode(), coroutine);

return coroutine;
}


/// <summary>
/// Clear delegate list
/// </summary>
//public static void StopAllEditorCoroutines()
//{
// EditorApplication.update = null;
//}


/// <summary>
/// Register callback for editor updates
/// </summary>
void Start()
{
EditorApplication.update += EditorUpdate;
}


/// <summary>
/// Unregister callback for editor updates.
/// </summary>
public void Stop()
{
if (EditorApplication.update != null)
EditorApplication.update -= EditorUpdate;

//s_ActiveCoroutines.Remove(this.GetHashCode());
}


/// <summary>
/// Delegate function called on editor updates.
/// </summary>
void EditorUpdate()
{
// Stop editor coroutine if it does not continue.
if (coroutine.MoveNext() == false)
Stop();

// Process the different types of EditorCoroutines.
if (coroutine.Current != null)
{

}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

58 changes: 5 additions & 53 deletions Scripts/Editor/TMP_EditorUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ private static string GetPackageRelativePath()
if (Directory.Exists(packagePath))
{
// Search default location for development package
if (Directory.Exists(packagePath + "/Assets/Packages/com.unity.TextMeshPro/GUISkins"))
if (Directory.Exists(packagePath + "/Assets/Packages/com.unity.TextMeshPro/Editor Resources"))
{
return "Assets/Packages/com.unity.TextMeshPro";
}

// Search for default location of normal TextMesh Pro AssetStore package
if (Directory.Exists(packagePath + "/Assets/TextMesh Pro/GUISkins"))
if (Directory.Exists(packagePath + "/Assets/TextMesh Pro/Editor Resources"))
{
return "Assets/TextMesh Pro";
}
Expand All @@ -212,13 +212,13 @@ private static string GetPackageFullPath()
if (Directory.Exists(packagePath))
{
// Search default location for development package
if (Directory.Exists(packagePath + "/Assets/Packages/com.unity.TextMeshPro/GUISkins"))
if (Directory.Exists(packagePath + "/Assets/Packages/com.unity.TextMeshPro/Editor Resources"))
{
return packagePath + "/Assets/Packages/com.unity.TextMeshPro";
}

// Search for default location of normal TextMesh Pro AssetStore package
if (Directory.Exists(packagePath + "/Assets/TextMesh Pro/GUISkins"))
if (Directory.Exists(packagePath + "/Assets/TextMesh Pro/Editor Resources"))
{
return packagePath + "/Assets/TextMesh Pro";
}
Expand All @@ -232,54 +232,6 @@ private static string GetPackageFullPath()
return null;
}

/// <summary>
/// Function to find the asset folder location in case it was moved by the user.
/// </summary>
/// <returns></returns>
public static string GetAssetLocation()
{
if (isTMProFolderLocated == false)
{
isTMProFolderLocated = true;

// Check for potential UPM package
string packagePath = Path.GetFullPath("Packages/com.unity.textmeshpro");
if (Directory.Exists(packagePath))
{
return "Packages/com.unity.textmeshpro";
}

string projectPath = Path.GetFullPath("Assets/..");
if (Directory.Exists(projectPath))
{

}

// Find all potential directories where TextMesh Pro and its resources could be located.
string[] matchingPaths = Directory.GetDirectories(projectPath, "*TextMeshPro", SearchOption.AllDirectories);
folderPath = ValidateLocation(matchingPaths, projectPath);
if (folderPath != null) return folderPath;

// Check alternative Asset folder name.
matchingPaths = Directory.GetDirectories(projectPath, "TextMesh Pro", SearchOption.AllDirectories);
folderPath = ValidateLocation(matchingPaths, projectPath);
if (folderPath != null) return folderPath;

//string packagePath = Path.GetFullPath("Packages/com.unity.textmeshpro");
//matchingPaths = Directory.GetDirectories(projectPath, "TextMeshPro", SearchOption.AllDirectories);
//folderPath = ValidateLocation(matchingPaths, packagePath);
//if (folderPath != null) return folderPath;
}

if (folderPath != null) return folderPath;
else
{
isTMProFolderLocated = false;
Debug.LogWarning("Could not located the \"TextMesh Pro/GUISkins\" Folder to load the Editor Skins.");
return null;
}
}


/// <summary>
/// Method to validate the location of the asset folder by making sure the GUISkins folder exists.
Expand All @@ -291,7 +243,7 @@ private static string ValidateLocation(string[] paths, string projectPath)
for (int i = 0; i < paths.Length; i++)
{
// Check if any of the matching directories contain a GUISkins directory.
if (Directory.Exists(paths[i] + "/GUISkins"))
if (Directory.Exists(paths[i] + "/Editor Resources"))
{
folderPath = paths[i].Replace(projectPath + "\\", "");
return folderPath;
Expand Down
Loading

0 comments on commit 9569234

Please sign in to comment.