@ -1,147 +0,0 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |||
<PropertyGroup> | |||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
<ProjectGuid>{23AB2621-A05C-4377-8418-85E6012C0BBE}</ProjectGuid> | |||
<OutputType>Library</OutputType> | |||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||
<RootNamespace>BSIPA_ModList</RootNamespace> | |||
<AssemblyName>BSIPA-ModList</AssemblyName> | |||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> | |||
<FileAlignment>512</FileAlignment> | |||
<Deterministic>true</Deterministic> | |||
<LangVersion>8.0</LangVersion> | |||
<PathMap>$(SolutionDir)=C:\</PathMap> | |||
<TargetFrameworkProfile /> | |||
</PropertyGroup> | |||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
<DebugSymbols>true</DebugSymbols> | |||
<DebugType>portable</DebugType> | |||
<Optimize>false</Optimize> | |||
<OutputPath>bin\Debug\</OutputPath> | |||
<DefineConstants>DEBUG;TRACE</DefineConstants> | |||
<ErrorReport>prompt</ErrorReport> | |||
<WarningLevel>4</WarningLevel> | |||
</PropertyGroup> | |||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||
<DebugType>portable</DebugType> | |||
<Optimize>true</Optimize> | |||
<OutputPath>bin\Release\</OutputPath> | |||
<DefineConstants>TRACE</DefineConstants> | |||
<ErrorReport>prompt</ErrorReport> | |||
<WarningLevel>4</WarningLevel> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<Reference Include="Assembly-CSharp"> | |||
<HintPath>..\Refs\Assembly-CSharp.dll</HintPath> | |||
<Private>False</Private> | |||
</Reference> | |||
<Reference Include="BeatSaberCustomUI"> | |||
<HintPath>..\Refs\BeatSaberCustomUI.dll</HintPath> | |||
<Private>False</Private> | |||
</Reference> | |||
<Reference Include="System" /> | |||
<Reference Include="System.Core" /> | |||
<Reference Include="System.Xml.Linq" /> | |||
<Reference Include="System.Data.DataSetExtensions" /> | |||
<Reference Include="Microsoft.CSharp" /> | |||
<Reference Include="System.Data" /> | |||
<Reference Include="System.Net.Http" /> | |||
<Reference Include="System.Xml" /> | |||
<Reference Include="Unity.TextMeshPro"> | |||
<HintPath>..\Refs\Unity.TextMeshPro.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine"> | |||
<HintPath>..\Refs\UnityEngine.Net4.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.AssetBundleModule"> | |||
<HintPath>..\Refs\UnityEngine.AssetBundleModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.CoreModule"> | |||
<HintPath>..\Refs\UnityEngine.CoreModule.Net4.dll</HintPath> | |||
<Private>False</Private> | |||
</Reference> | |||
<Reference Include="UnityEngine.TextRenderingModule"> | |||
<HintPath>..\Refs\UnityEngine.TextRenderingModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UI"> | |||
<HintPath>..\Refs\UnityEngine.UI.dll</HintPath> | |||
<Private>False</Private> | |||
</Reference> | |||
<Reference Include="UnityEngine.UIModule"> | |||
<HintPath>..\Refs\UnityEngine.UIModule.dll</HintPath> | |||
<Private>False</Private> | |||
</Reference> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Compile Include="DownloadController.cs" /> | |||
<Compile Include="Plugin.cs" /> | |||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||
<Compile Include="UI\ButtonUI.cs" /> | |||
<Compile Include="UI\DownloadProgressCell.cs" /> | |||
<Compile Include="UI\ModListFlowCoordinator.cs" /> | |||
<Compile Include="UI\ViewControllers\SettingsViewController.cs" /> | |||
<Compile Include="UI\ViewControllers\BackButtonNavigationController.cs" /> | |||
<Compile Include="UI\ViewControllers\DownloadProgressViewController.cs" /> | |||
<Compile Include="UI\FloatingNotification.cs" /> | |||
<Compile Include="UI\ViewControllers\MarkdownView.cs" /> | |||
<Compile Include="UI\ViewControllers\ModCells.cs" /> | |||
<Compile Include="UI\ViewControllers\ModInfoViewController.cs" /> | |||
<Compile Include="UI\ViewControllers\ModListController.cs" /> | |||
<Compile Include="UI\WarningUI.cs" /> | |||
<Compile Include="Utilities.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\IPA.Loader\IPA.Loader.csproj"> | |||
<Project>{5ad344f0-01a0-4ca8-92e5-9d095737744d}</Project> | |||
<Name>IPA.Loader</Name> | |||
<Private>False</Private> | |||
</ProjectReference> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<EmbeddedResource Include="manifest.json" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="CommonMark.NET"> | |||
<Version>0.15.1</Version> | |||
</PackageReference> | |||
<PackageReference Include="SemanticVersioning"> | |||
<Version>1.2.2</Version> | |||
</PackageReference> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<EmbeddedResource Include="Icons\mod_bsipa.png" /> | |||
<EmbeddedResource Include="Icons\mod_ipa.png" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<EmbeddedResource Include="Icons\self.png" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<EmbeddedResource Include="Icons\library.png" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<EmbeddedResource Include="README.md" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<EmbeddedResource Include="..\TMP Exporter\Assets\AssetBundles\fonts\consolas.font"> | |||
<Link>Bundles\consolas.font</Link> | |||
</EmbeddedResource> | |||
</ItemGroup> | |||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
<Target Name="AfterBuild"> | |||
<Message Text="Packing..." Importance="normal" /> | |||
<ItemGroup> | |||
<CMark Include="$(OutputPath)CommonMark.*" /> | |||
<BadFiles Include="$(OutputPath)**/*" Exclude="$(OutputPath)**/$(AssemblyName).*;@(CMark)" /> | |||
</ItemGroup> | |||
<Delete Files="@(BadFiles)" /> | |||
<Move SourceFiles="@(CMark)" DestinationFolder="$(OutputPath)Libs/" /> | |||
<ItemGroup> | |||
<UnBadFiles Include="$(OutputPath)*" /> | |||
</ItemGroup> | |||
<Move SourceFiles="@(UnBadFiles)" DestinationFolder="$(OutputPath)Plugins/" /> | |||
<Exec Command=""$(MSBuildBinPath)\MSBuild.exe" "$(MSBuildProjectDirectory)\PostBuild.msbuild" /property:OPath=$(OutputPath) /property:Configuration=$(Configuration) /property:SolDir=$(SolutionDir)" /> | |||
</Target> | |||
</Project> |
@ -1,216 +0,0 @@ | |||
using IPA.Config; | |||
using IPA.Updating.BeatMods; | |||
using System; | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using UnityEngine; | |||
using static IPA.Updating.BeatMods.Updater; | |||
namespace BSIPA_ModList | |||
{ | |||
internal class DownloadObject | |||
{ | |||
public enum States | |||
{ | |||
ToDownload, Downloading, Installing, Failed, Completed | |||
} | |||
public DependencyObject Mod; | |||
public Sprite Icon; | |||
public States State = States.ToDownload; | |||
public double Progress = 0; | |||
} | |||
internal class DownloadController : MonoBehaviour | |||
{ | |||
private static DownloadController _instance; | |||
public static DownloadController Instance | |||
{ | |||
get | |||
{ | |||
if (_instance == null) | |||
_instance = Create(); | |||
return _instance; | |||
} | |||
} | |||
public static DownloadController Create() | |||
{ | |||
var inst = new GameObject("BSIPA Modlist Download Controller").AddComponent<DownloadController>(); | |||
if (IPA.Config.SelfConfig.Updates_.AutoCheckUpdates_) | |||
inst.StartCoroutine(inst.StartUpdateCheck()); | |||
return inst; | |||
} | |||
private IEnumerator StartUpdateCheck() | |||
{ | |||
yield return null; | |||
CheckForUpdates(); | |||
} | |||
private readonly List<DownloadObject> downloads = new List<DownloadObject>(); | |||
private readonly Dictionary<DependencyObject, DownloadObject> lookup = new Dictionary<DependencyObject, DownloadObject>(); | |||
internal IReadOnlyList<DownloadObject> Downloads => downloads; | |||
public event Action OnCheckForUpdates; | |||
public event Action<int> OnCheckForUpdatesComplete; | |||
public event Action OnDownloadStateChanged; | |||
public event Action OnDownloaderListChanged; | |||
private enum States | |||
{ | |||
Start, Checking, UpdatesFound, Downloading, Done, DoneWithNoUpdates | |||
} | |||
private States _state = States.Start; | |||
private States State | |||
{ | |||
get => _state; | |||
set | |||
{ | |||
_state = value; | |||
OnDownloadStateChanged?.Invoke(); | |||
} | |||
} | |||
public bool CanCheck => State == States.Start || IsDone; | |||
public bool CanDownload => State == States.UpdatesFound; | |||
public bool CanReset => State == States.UpdatesFound; | |||
public bool IsChecking => State == States.Checking; | |||
public bool IsDownloading => State == States.Downloading; | |||
public bool IsDone => State == States.Done || State == States.DoneWithNoUpdates; | |||
public bool HadUpdates => State == States.Done; | |||
public void Awake() => DontDestroyOnLoad(this); | |||
public void CheckForUpdates() | |||
{ | |||
if (!CanCheck) | |||
throw new InvalidOperationException("Invalid state for CheckForUpdates to be called"); | |||
State = States.Checking; | |||
OnCheckForUpdates?.Invoke(); | |||
Updater.Instance.CheckForUpdates(UpdateCheckComplete); | |||
} | |||
public void ResetCheck(bool resetCache = false) | |||
{ | |||
if (!CanReset) | |||
throw new InvalidOperationException("Invalid state for ResetCheck to be called"); | |||
Clear(); | |||
State = States.Start; | |||
if (resetCache) | |||
ResetRequestCache(); | |||
} | |||
private void Clear() | |||
{ | |||
downloads.Clear(); | |||
lookup.Clear(); | |||
OnDownloaderListChanged?.Invoke(); | |||
} | |||
private void Add(DownloadObject obj) | |||
{ | |||
downloads.Add(obj); | |||
lookup.Add(obj.Mod, obj); | |||
} | |||
private void Remove(DependencyObject obj) | |||
{ | |||
downloads.Remove(lookup[obj]); | |||
lookup.Remove(obj); | |||
OnDownloaderListChanged?.Invoke(); | |||
} | |||
private void UpdateCheckComplete(List<DependencyObject> found) | |||
{ | |||
State = States.UpdatesFound; | |||
OnCheckForUpdatesComplete?.Invoke(found.Count); | |||
foreach (var dep in found) | |||
Add(new DownloadObject | |||
{ | |||
Mod = dep, | |||
Icon = dep.IsLegacy ? Utilities.DefaultIPAIcon : Utilities.GetIcon(dep.LocalPluginMeta?.Metadata), | |||
State = DownloadObject.States.ToDownload, | |||
Progress = 0 | |||
}); | |||
OnDownloaderListChanged?.Invoke(); | |||
if (downloads.Count == 0) | |||
OnAllDownloadsCompleted(false); | |||
else if (IPA.Config.SelfConfig.Updates_.AutoUpdate_) | |||
StartDownloads(); | |||
} | |||
public void StartDownloads() | |||
{ | |||
if (!CanDownload) | |||
throw new InvalidOperationException("Invalid state for StartDownloads to be called"); | |||
State = States.Downloading; | |||
Updater.Instance.StartDownload(downloads.Select(d => d.Mod), _DownloadStart, _DownloadProgress, | |||
_DownloadFailed, _DownloadFinished, _InstallFailed, _InstallFinished); | |||
} | |||
private void _DownloadStart(DependencyObject obj) | |||
{ | |||
var dl = lookup[obj]; | |||
dl.Progress = 0; | |||
dl.State = DownloadObject.States.Downloading; | |||
} | |||
private void _DownloadProgress(DependencyObject obj, long totalBytes, long currentBytes, double progress) | |||
{ | |||
lookup[obj].Progress = progress; | |||
} | |||
private void _DownloadFailed(DependencyObject obj, string error) | |||
{ | |||
lookup[obj].State = DownloadObject.States.Failed; | |||
} | |||
private void _DownloadFinished(DependencyObject obj) | |||
{ | |||
lookup[obj].State = DownloadObject.States.Installing; | |||
} | |||
private void _InstallFailed(DependencyObject obj, Exception error) | |||
{ | |||
lookup[obj].State = DownloadObject.States.Failed; | |||
} | |||
private void _InstallFinished(DependencyObject obj, bool didError) | |||
{ | |||
if (!didError) | |||
lookup[obj].State = DownloadObject.States.Completed; | |||
StartCoroutine(RemoveModFromList(obj)); | |||
} | |||
private IEnumerator RemoveModFromList(DependencyObject obj) | |||
{ | |||
yield return new WaitForSeconds(1f); | |||
Remove(obj); | |||
if (downloads.Count == 0) | |||
OnAllDownloadsCompleted(true); | |||
} | |||
private void OnAllDownloadsCompleted(bool hadUpdates) | |||
{ | |||
State = hadUpdates ? States.Done : States.DoneWithNoUpdates; | |||
} | |||
} | |||
} |
@ -1,119 +0,0 @@ | |||
using IPA; | |||
using UnityEngine.SceneManagement; | |||
using IPALogger = IPA.Logging.Logger; | |||
using BSIPA_ModList.UI; | |||
using UnityEngine; | |||
using IPA.Logging; | |||
using BSIPA_ModList.UI.ViewControllers; | |||
using System.Collections; | |||
using IPA.Loader; | |||
using IPA.Config; | |||
using IPA.Utilities; | |||
using System; | |||
namespace BSIPA_ModList | |||
{ | |||
internal static class Logger | |||
{ | |||
internal static IPALogger log { get; set; } | |||
internal static IPALogger md => log.GetChildLogger("MarkDown"); | |||
} | |||
internal class SelfConfig | |||
{ | |||
public bool Regenerate = true; | |||
public bool ShowEnableDisable = false; | |||
} | |||
/// <summary> | |||
/// The main plugin type for the in-game mod list mod. | |||
/// </summary> | |||
internal class Plugin : IPlugin | |||
{ | |||
internal static IConfigProvider provider; | |||
internal static Ref<SelfConfig> config; | |||
internal static event Action<SelfConfig> OnConfigChaned; | |||
/// <summary> | |||
/// Initializes the plugin with certain parameters. Is only called once. | |||
/// | |||
/// This is called by the plugin loader in BSIPA, and thus must be <see langword="public"/>. | |||
/// </summary> | |||
/// <param name="logger">a logger to initialize the plugin with</param> | |||
public void Init(IPALogger logger, IConfigProvider provider) | |||
{ | |||
Logger.log = logger; | |||
Plugin.provider = provider; | |||
config = provider.MakeLink<SelfConfig>((p, r) => | |||
{ | |||
if (r.Value.Regenerate) | |||
p.Store(r.Value = new SelfConfig { Regenerate = false }); | |||
OnConfigChaned?.Invoke(r.Value); | |||
}); | |||
IPA.Updating.BeatMods.Updater.ModListPresent = true; | |||
// Load resources ahead of time | |||
MarkdownView.StartLoadResourcesAsync(); | |||
SharedCoroutineStarter.instance.StartCoroutine(LoadPluginIcons()); | |||
} | |||
public void OnActiveSceneChanged(Scene prevScene, Scene nextScene) | |||
{ | |||
} | |||
public void OnApplicationQuit() | |||
{ | |||
} | |||
public void OnApplicationStart() | |||
{ | |||
} | |||
private static IEnumerator LoadPluginIcons() | |||
{ | |||
foreach (var p in PluginManager.EnabledPlugins) | |||
{ | |||
yield return null; | |||
Logger.log.Debug($"Loading icon for {p.Metadata.Name}"); | |||
var _ = p.Metadata.GetIcon(); | |||
} | |||
} | |||
public void OnFixedUpdate() | |||
{ | |||
} | |||
public void OnSceneLoaded(Scene scene, LoadSceneMode sceneMode) | |||
{ | |||
if (scene.name == "MenuCore") | |||
{ | |||
FloatingNotification.Create(); | |||
if (ButtonUI.Instance == null) | |||
new GameObject("BSIPA Mod List Object").AddComponent<ButtonUI>().Init(); | |||
if (WarningUI.Instance == null) | |||
new GameObject("BSIPA Mod List Warning UI").AddComponent<WarningUI>().Init(); | |||
} | |||
} | |||
public void OnSceneUnloaded(Scene scene) | |||
{ | |||
} | |||
public void OnUpdate() | |||
{ | |||
} | |||
public void OnEnable() | |||
{ | |||
} | |||
} | |||
} |
@ -1,17 +0,0 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project DefaultTargets="PostBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> | |||
<PropertyGroup> | |||
<OPath></OPath> | |||
<SolDir></SolDir> | |||
</PropertyGroup> | |||
<UsingTask TaskName="AssemblyRename" AssemblyFile="$(SolDir)BuildTools\AssemblyRenameStep\bin\$(Configuration)\AssemblyRenameStep.dll" /> | |||
<Target Name="PostBuild"> | |||
<Message Text="Relocating" Importance="normal" /> | |||
<ItemGroup> | |||
<ToRename Include="$(OPath)Libs\**\*.dll" /> | |||
</ItemGroup> | |||
<!--<AssemblyRename Assemblies="@(ToRename)" />--> | |||
</Target> | |||
</Project> |
@ -1,36 +0,0 @@ | |||
using System.Reflection; | |||
using System.Runtime.CompilerServices; | |||
using System.Runtime.InteropServices; | |||
// General Information about an assembly is controlled through the following | |||
// set of attributes. Change these attribute values to modify the information | |||
// associated with an assembly. | |||
[assembly: AssemblyTitle("BSIPA-ModList")] | |||
[assembly: AssemblyDescription("")] | |||
[assembly: AssemblyConfiguration("")] | |||
[assembly: AssemblyCompany("")] | |||
[assembly: AssemblyProduct("BSIPA-ModList")] | |||
[assembly: AssemblyCopyright("Copyright © 2019")] | |||
[assembly: AssemblyTrademark("")] | |||
[assembly: AssemblyCulture("")] | |||
// Setting ComVisible to false makes the types in this assembly not visible | |||
// to COM components. If you need to access a type in this assembly from | |||
// COM, set the ComVisible attribute to true on that type. | |||
[assembly: ComVisible(false)] | |||
// The following GUID is for the ID of the typelib if this project is exposed to COM | |||
[assembly: Guid("23ab2621-a05c-4377-8418-85e6012c0bbe")] | |||
// Version information for an assembly consists of the following four values: | |||
// | |||
// Major Version | |||
// Minor Version | |||
// Build Number | |||
// Revision | |||
// | |||
// You can specify all the values or you can default the Build and Revision Numbers | |||
// by using the '*' as shown below: | |||
// [assembly: AssemblyVersion("1.0.*")] | |||
[assembly: AssemblyVersion("1.3.0.0")] | |||
[assembly: AssemblyFileVersion("1.3.0.0")] |
@ -1,7 +0,0 @@ | |||
BSIPA Mod List | |||
============== | |||
Mod List is just an in-game viewer for the mods you have installed. It also lets you have more control over the updating already present in BSIPA. | |||
Find all builds in [AppVeyor][appv_link]. | |||
[appv_link]: https://ci.appveyor.com/project/nike4613/beatsaber-ipa-reloaded-9smsb/build/artifacts "{color: #00FF00}" |
@ -1,85 +0,0 @@ | |||
using CustomUI.BeatSaber; | |||
using System; | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using UnityEngine; | |||
using UnityEngine.SceneManagement; | |||
using UnityEngine.UI; | |||
namespace BSIPA_ModList.UI | |||
{ | |||
internal class ButtonUI : MonoBehaviour | |||
{ | |||
private const string ControllerPanel = "MainMenuViewController/SmallButtons"; | |||
private const string CopyButton = "BeatmapEditorButton"; | |||
internal static ButtonUI Instance; | |||
public void Awake() | |||
{ | |||
DontDestroyOnLoad(gameObject); | |||
SceneManager.activeSceneChanged += this.SceneManager_activeSceneChanged; | |||
} | |||
private void SceneManager_activeSceneChanged(Scene from, Scene to) | |||
{ | |||
if (to.name == "EmptyTransition") | |||
{ | |||
if (Instance != null) | |||
{ | |||
Instance.StopAllCoroutines(); | |||
Destroy(Instance.gameObject); | |||
menuFlow = null; | |||
} | |||
Instance = null; | |||
} | |||
} | |||
public void Init() | |||
{ | |||
Instance = this; | |||
Logger.log.Debug("UI Awake"); | |||
StartCoroutine(AddModListButton()); | |||
} | |||
private static ModListFlowCoordinator menuFlow; | |||
private static readonly WaitUntil _bottomPanelExists = new WaitUntil(() => GameObject.Find(ControllerPanel) != null); | |||
private static RectTransform panel; | |||
private static HoverHint hintText; | |||
private static Button button; | |||
private static IEnumerator AddModListButton() | |||
{ | |||
yield return _bottomPanelExists; | |||
Logger.log.Debug("Adding button to main menu"); | |||
lock (Instance) | |||
{ | |||
if (menuFlow == null) | |||
menuFlow = new GameObject("BSIPA Mod List Flow Controller").AddComponent<ModListFlowCoordinator>(); | |||
if (panel == null) | |||
panel = GameObject.Find(ControllerPanel).transform as RectTransform; | |||
if (button == null) | |||
{ | |||
button = BeatSaberUI.CreateUIButton(panel, CopyButton, () => | |||
{ | |||
menuFlow.Present(); | |||
}, "Mod List"); | |||
panel.Find(CopyButton).SetAsLastSibling(); | |||
hintText = BeatSaberUI.AddHintText(button.transform as RectTransform, "View and control updates for installed mods"); | |||
} | |||
yield break; | |||
} | |||
} | |||
} | |||
} |
@ -1,94 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using TMPro; | |||
using System.Threading.Tasks; | |||
using IPA.Updating.BeatMods; | |||
using UnityEngine; | |||
namespace BSIPA_ModList.UI | |||
{ | |||
// originally ripped verbatim from Andruzz's BeatSaverDownloader | |||
internal class DownloadProgressCell : LevelListTableCell | |||
{ | |||
private DownloadObject mod; | |||
public void Init(DownloadObject mod) | |||
{ | |||
Destroy(GetComponent<LevelListTableCell>()); | |||
reuseIdentifier = "DownloadCell"; | |||
this.mod = mod; | |||
_authorText = GetComponentsInChildren<TextMeshProUGUI>().First(x => x.name == "Author"); | |||
_authorText.enableWordWrapping = false; | |||
_authorText.overflowMode = TextOverflowModes.Overflow; | |||
_songNameText = GetComponentsInChildren<TextMeshProUGUI>().First(x => x.name == "SongName"); | |||
_songNameText.enableWordWrapping = false; | |||
_songNameText.overflowMode = TextOverflowModes.Overflow; | |||
_coverRawImage = GetComponentsInChildren<UnityEngine.UI.RawImage>().First(x => x.name == "CoverImage"); | |||
_bgImage = GetComponentsInChildren<UnityEngine.UI.Image>().First(x => x.name == "BG"); | |||
_highlightImage = GetComponentsInChildren<UnityEngine.UI.Image>().First(x => x.name == "Highlight"); | |||
_beatmapCharacteristicAlphas = new float[0]; | |||
_beatmapCharacteristicImages = new UnityEngine.UI.Image[0]; | |||
_bought = true; | |||
foreach (var icon in GetComponentsInChildren<UnityEngine.UI.Image>().Where(x => x.name.StartsWith("LevelTypeIcon"))) | |||
Destroy(icon.gameObject); | |||
_songNameText.text = $"{mod.Mod.Name} <size=60%>v{mod.Mod.ResolvedVersion}</size>"; | |||
_authorText.text = ""; | |||
_coverRawImage.texture = mod.Icon.texture; | |||
_bgImage.enabled = true; | |||
_bgImage.sprite = Sprite.Create(new Texture2D(1, 1), new Rect(0, 0, 1, 1), Vector2.one / 2f); | |||
_bgImage.type = UnityEngine.UI.Image.Type.Filled; | |||
_bgImage.fillMethod = UnityEngine.UI.Image.FillMethod.Horizontal; | |||
Update(); | |||
} | |||
public void Update() | |||
{ | |||
if (mod == null) return; | |||
_bgImage.enabled = true; | |||
switch (mod.State) | |||
{ | |||
case DownloadObject.States.ToDownload: | |||
{ | |||
_bgImage.color = new Color(1f, 1f, 1f, 0.35f); | |||
_bgImage.fillAmount = 0; | |||
} | |||
break; | |||
case DownloadObject.States.Downloading: | |||
{ | |||
_bgImage.color = new Color(1f, 1f, 1f, 0.35f); | |||
_bgImage.fillAmount = (float)mod.Progress; | |||
} | |||
break; | |||
case DownloadObject.States.Installing: | |||
{ | |||
_bgImage.color = new Color(0f, 1f, 1f, 0.35f); | |||
_bgImage.fillAmount = 1f; | |||
} | |||
break; | |||
case DownloadObject.States.Completed: | |||
{ | |||
_bgImage.color = new Color(0f, 1f, 0f, 0.35f); | |||
_bgImage.fillAmount = 1f; | |||
} | |||
break; | |||
case DownloadObject.States.Failed: | |||
{ | |||
_bgImage.color = new Color(1f, 0f, 0f, 0.35f); | |||
_bgImage.fillAmount = 1f; | |||
} | |||
break; | |||
} | |||
} | |||
} | |||
} |
@ -1,237 +0,0 @@ | |||
using CustomUI.BeatSaber; | |||
using System.Collections; | |||
using TMPro; | |||
using UnityEngine; | |||
using UnityEngine.SceneManagement; | |||
using UnityEngine.UI; | |||
namespace BSIPA_ModList.UI | |||
{ | |||
internal class FloatingNotification : MonoBehaviour | |||
{ | |||
private Canvas _canvas; | |||
private TMP_Text _authorNameText; | |||
private TMP_Text _pluginNameText; | |||
private TMP_Text _headerText; | |||
private Image _loadingBackg; | |||
private Image _loadingBar; | |||
private static readonly Vector3 Position = new Vector3(2.25f, 2.3f, 1.55f); | |||
private static readonly Vector3 Rotation = new Vector3(0, 60, 0); | |||
private static readonly Vector3 Scale = new Vector3(0.01f, 0.01f, 0.01f); | |||
private static readonly Vector2 CanvasSize = new Vector2(100, 50); | |||
private const string AuthorNameText = "BSIPA"; | |||
private const float AuthorNameFontSize = 7f; | |||
private static readonly Vector2 AuthorNamePosition = new Vector2(10, 31); | |||
private const string PluginNameText = "Mod Updater"; | |||
private const float PluginNameFontSize = 9f; | |||
private static readonly Vector2 PluginNamePosition = new Vector2(10, 23); | |||
private static readonly Vector2 HeaderPosition = new Vector2(10, 15); | |||
private static readonly Vector2 HeaderSize = new Vector2(100, 20); | |||
private const string HeaderText = "Checking for updates..."; | |||
private const float HeaderFontSize = 15f; | |||
private static readonly Vector2 LoadingBarSize = new Vector2(100, 10); | |||
private static readonly Color BackgroundColor = new Color(0, 0, 0, 0.2f); | |||
private bool _showingMessage; | |||
public static FloatingNotification Create() | |||
{ | |||
return new GameObject("Mod List Floating Notification").AddComponent<FloatingNotification>(); | |||
} | |||
public void ShowMessage(string message, float time) | |||
{ | |||
StopAllCoroutines(); | |||
_showingMessage = true; | |||
_headerText.text = message; | |||
_headerText.alignment = TextAlignmentOptions.Left; | |||
_loadingBar.enabled = false; | |||
_loadingBackg.enabled = false; | |||
_canvas.enabled = true; | |||
StartCoroutine(DisableCanvasRoutine(time)); | |||
} | |||
public void ShowMessage(string message) | |||
{ | |||
StopAllCoroutines(); | |||
_showingMessage = true; | |||
_headerText.text = message; | |||
_headerText.alignment = TextAlignmentOptions.Left; | |||
_loadingBar.enabled = false; | |||
_loadingBackg.enabled = false; | |||
_canvas.enabled = true; | |||
} | |||
protected void OnEnable() | |||
{ | |||
SceneManager.activeSceneChanged += SceneManagerOnActiveSceneChanged; | |||
DownloadController.Instance.OnDownloadStateChanged += DownloaderStateChanged; | |||
DownloadController.Instance.OnCheckForUpdates += CheckForUpdatesStart; | |||
DownloadController.Instance.OnCheckForUpdatesComplete += CheckForUpdatesDone; | |||
} | |||
protected void OnDisable() | |||
{ | |||
SceneManager.activeSceneChanged -= SceneManagerOnActiveSceneChanged; | |||
DownloadController.Instance.OnDownloadStateChanged -= DownloaderStateChanged; | |||
DownloadController.Instance.OnCheckForUpdates -= CheckForUpdatesStart; | |||
DownloadController.Instance.OnCheckForUpdatesComplete -= CheckForUpdatesDone; | |||
} | |||
private void CheckForUpdatesStart() | |||
{ | |||
StopAllCoroutines(); | |||
_showingMessage = false; | |||
_headerText.text = HeaderText; | |||
_headerText.alignment = TextAlignmentOptions.Left; | |||
_loadingBar.enabled = false; | |||
_loadingBackg.enabled = false; | |||
_canvas.enabled = true; | |||
} | |||
private bool updatesZero = false; | |||
private void CheckForUpdatesDone(int count) | |||
{ | |||
if (count == 0) updatesZero = true; | |||
else updatesZero = false; | |||
StopAllCoroutines(); | |||
_showingMessage = false; | |||
_headerText.text = $"{count} updates found"; | |||
_headerText.alignment = TextAlignmentOptions.Left; | |||
_loadingBar.enabled = false; | |||
_loadingBackg.enabled = false; | |||
_canvas.enabled = true; | |||
StartCoroutine(DisableCanvasRoutine(5f)); | |||
} | |||
private void SceneManagerOnActiveSceneChanged(Scene oldScene, Scene newScene) | |||
{ | |||
if (newScene.name == "MenuCore") | |||
{ | |||
if (_showingMessage) | |||
{ | |||
_canvas.enabled = true; | |||
} | |||
} | |||
else | |||
{ | |||
_canvas.enabled = false; | |||
} | |||
} | |||
private void DownloaderStateChanged() | |||
{ | |||
if (DownloadController.Instance.IsDownloading) | |||
{ | |||
StopAllCoroutines(); | |||
_showingMessage = false; | |||
_headerText.text = "Downloading updates..."; | |||
_headerText.alignment = TextAlignmentOptions.Left; | |||
_loadingBar.enabled = false; | |||
_loadingBackg.enabled = false; | |||
_canvas.enabled = true; | |||
} | |||
if (DownloadController.Instance.IsDone && !updatesZero) | |||
{ | |||
StopAllCoroutines(); | |||
_showingMessage = false; | |||
_headerText.text = "Update complete. Restart to finish installation."; | |||
_headerText.alignment = TextAlignmentOptions.Center; | |||
_loadingBar.enabled = false; | |||
_loadingBackg.enabled = false; | |||
} | |||
} | |||
internal void Close() | |||
{ | |||
StartCoroutine(DisableCanvasRoutine(0f)); | |||
} | |||
private IEnumerator DisableCanvasRoutine(float time) | |||
{ | |||
yield return new WaitForSecondsRealtime(time); | |||
_canvas.enabled = false; | |||
_showingMessage = false; | |||
} | |||
internal static FloatingNotification instance; | |||
protected void Awake() | |||
{ | |||
if (instance != null) | |||
{ | |||
Destroy(this); | |||
return; | |||
} | |||
instance = this; | |||
gameObject.transform.position = Position; | |||
gameObject.transform.eulerAngles = Rotation; | |||
gameObject.transform.localScale = Scale; | |||
_canvas = gameObject.AddComponent<Canvas>(); | |||
_canvas.renderMode = RenderMode.WorldSpace; | |||
_canvas.enabled = false; | |||
var rectTransform = _canvas.transform as RectTransform; | |||
rectTransform.sizeDelta = CanvasSize; | |||
_authorNameText = BeatSaberUI.CreateText(_canvas.transform as RectTransform, AuthorNameText, AuthorNamePosition); | |||
rectTransform = _authorNameText.transform as RectTransform; | |||
rectTransform.SetParent(_canvas.transform, false); | |||
rectTransform.anchoredPosition = AuthorNamePosition; | |||
rectTransform.sizeDelta = HeaderSize; | |||
_authorNameText.text = AuthorNameText; | |||
_authorNameText.fontSize = AuthorNameFontSize; | |||
_pluginNameText = BeatSaberUI.CreateText(_canvas.transform as RectTransform, PluginNameText, PluginNamePosition); | |||
rectTransform = _pluginNameText.transform as RectTransform; | |||
rectTransform.SetParent(_canvas.transform, false); | |||
rectTransform.sizeDelta = HeaderSize; | |||
rectTransform.anchoredPosition = PluginNamePosition; | |||
_pluginNameText.text = PluginNameText; | |||
_pluginNameText.fontSize = PluginNameFontSize; | |||
_headerText = BeatSaberUI.CreateText(_canvas.transform as RectTransform, HeaderText, HeaderPosition); | |||
rectTransform = _headerText.transform as RectTransform; | |||
rectTransform.SetParent(_canvas.transform, false); | |||
rectTransform.anchoredPosition = HeaderPosition; | |||
rectTransform.sizeDelta = HeaderSize; | |||
_headerText.text = HeaderText; | |||
_headerText.fontSize = HeaderFontSize; | |||
_loadingBackg = new GameObject("Background").AddComponent<Image>(); | |||
rectTransform = _loadingBackg.transform as RectTransform; | |||
rectTransform.SetParent(_canvas.transform, false); | |||
rectTransform.sizeDelta = LoadingBarSize; | |||
_loadingBackg.color = BackgroundColor; | |||
_loadingBar = new GameObject("Loading Bar").AddComponent<Image>(); | |||
rectTransform = _loadingBar.transform as RectTransform; | |||
rectTransform.SetParent(_canvas.transform, false); | |||
rectTransform.sizeDelta = LoadingBarSize; | |||
var tex = Texture2D.whiteTexture; | |||
var sprite = Sprite.Create(tex, new Rect(0, 0, tex.width, tex.height), Vector2.one * 0.5f, 100, 1); | |||
_loadingBar.sprite = sprite; | |||
_loadingBar.type = Image.Type.Filled; | |||
_loadingBar.fillMethod = Image.FillMethod.Horizontal; | |||
_loadingBar.color = new Color(1, 1, 1, 0.5f); | |||
DontDestroyOnLoad(gameObject); | |||
} | |||
/*private void Update() | |||
{ | |||
if (!_canvas.enabled) return; | |||
_loadingBar.fillAmount = SongLoader.LoadingProgress; | |||
}*/ | |||
} | |||
} |
@ -1,146 +0,0 @@ | |||
using BSIPA_ModList.UI.ViewControllers; | |||
using CustomUI.BeatSaber; | |||
using CustomUI.Utilities; | |||
using IPA.Loader; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Reflection; | |||
using UnityEngine; | |||
using UnityEngine.Events; | |||
using UnityEngine.SceneManagement; | |||
using VRUI; | |||
namespace BSIPA_ModList.UI | |||
{ | |||
internal class ModListFlowCoordinator : FlowCoordinator | |||
{ | |||
private BackButtonNavigationController navigationController; | |||
private ModListController modList; | |||
private DownloadProgressViewController downloads; | |||
private VRUIViewController settings; | |||
#pragma warning disable CS0618 | |||
protected override void DidActivate(bool firstActivation, ActivationType activationType) | |||
{ // thx Caeden | |||
if (firstActivation && activationType == ActivationType.AddedToHierarchy) | |||
{ | |||
title = "Installed Mods"; | |||
navigationController = BeatSaberUI.CreateViewController<BackButtonNavigationController>(); | |||
navigationController.didFinishEvent += backButton_DidFinish; | |||
modList = BeatSaberUI.CreateViewController<ModListController>(); | |||
modList.Init(this, PluginManager.AllPlugins.Select(p => p.Metadata).Concat(PluginManager.DisabledPlugins), PluginLoader.ignoredPlugins, PluginManager.Plugins); | |||
settings = SettingsViewController.Create(); | |||
downloads = BeatSaberUI.CreateViewController<DownloadProgressViewController>(); | |||
PushViewControllerToNavigationController(navigationController, modList); | |||
} | |||
ProvideInitialViewControllers(navigationController, settings, downloads); | |||
} | |||
#pragma warning restore | |||
private delegate void PresentFlowCoordDel(FlowCoordinator self, FlowCoordinator newF, Action finished, bool immediate, bool replaceTop); | |||
private static PresentFlowCoordDel presentFlow; | |||
public void Present(Action finished = null, bool immediate = false, bool replaceTop = false) | |||
{ | |||
if (presentFlow == null) | |||
{ | |||
var ty = typeof(FlowCoordinator); | |||
var m = ty.GetMethod("PresentFlowCoordinator", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); | |||
presentFlow = (PresentFlowCoordDel)Delegate.CreateDelegate(typeof(PresentFlowCoordDel), m); | |||
} | |||
MainFlowCoordinator mainFlow = Resources.FindObjectsOfTypeAll<MainFlowCoordinator>().First(); | |||
presentFlow(mainFlow, this, finished, immediate, replaceTop); | |||
} | |||
public bool HasSelected { get; private set; } = false; | |||
public void SetSelected(VRUIViewController selected, Action callback = null, bool immediate = false) | |||
{ | |||
if (immediate) | |||
{ | |||
if (HasSelected) | |||
PopViewController(immediate: true); | |||
PushViewController(selected, callback, true); | |||
HasSelected = true; | |||
} | |||
else | |||
{ | |||
if (HasSelected) | |||
PopViewController(() => | |||
{ | |||
PushViewController(selected, callback, immediate); | |||
HasSelected = true; | |||
}, immediate); | |||
else | |||
{ | |||
PushViewController(selected, callback, immediate); | |||
HasSelected = true; | |||
} | |||
} | |||
} | |||
public void ClearSelected(Action callback = null, bool immediate = false) | |||
{ | |||
if (HasSelected) PopViewController(callback, immediate); | |||
HasSelected = false; | |||
} | |||
public void PushViewController(VRUIViewController controller, Action callback = null, bool immediate = false) | |||
{ | |||
PushViewControllerToNavigationController(navigationController, controller, callback, immediate); | |||
} | |||
public void PopViewController(Action callback = null, bool immediate = false) | |||
{ | |||
PopViewControllerFromNavigationController(navigationController, callback, immediate); | |||
} | |||
internal HashSet<Action> exitActions = new HashSet<Action>(); | |||
private delegate void DismissFlowDel(FlowCoordinator self, FlowCoordinator newF, Action finished, bool immediate); | |||
private static DismissFlowDel dismissFlow; | |||
private void backButton_DidFinish() | |||
{ | |||
if (dismissFlow == null) | |||
{ | |||
var ty = typeof(FlowCoordinator); | |||
var m = ty.GetMethod("DismissFlowCoordinator", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); | |||
dismissFlow = (DismissFlowDel)Delegate.CreateDelegate(typeof(DismissFlowDel), m); | |||
} | |||
if (exitActions.Count == 0) | |||
{ | |||
MainFlowCoordinator mainFlow = Resources.FindObjectsOfTypeAll<MainFlowCoordinator>().First(); | |||
dismissFlow(mainFlow, this, null, false); | |||
} | |||
else | |||
{ | |||
var actions = exitActions; | |||
UnityAction<Scene, LoadSceneMode> releaseAction = null; | |||
releaseAction = (a, b) => SceneManager_sceneLoaded(actions, releaseAction, a, b); | |||
SceneManager.sceneLoaded += releaseAction; | |||
Resources.FindObjectsOfTypeAll<MenuTransitionsHelperSO>().First().RestartGame(true); | |||
} | |||
} | |||
private static void SceneManager_sceneLoaded(HashSet<Action> actions, UnityAction<Scene, LoadSceneMode> self, Scene arg0, LoadSceneMode arg1) | |||
{ | |||
if (arg0.name == "Init") | |||
{ | |||
SceneManager.sceneLoaded -= self; | |||
foreach (var act in actions) | |||
act(); | |||
} | |||
} | |||
} | |||
} |
@ -1,22 +0,0 @@ | |||
using CustomUI.BeatSaber; | |||
using System; | |||
using UnityEngine.UI; | |||
using VRUI; | |||
namespace BSIPA_ModList.UI | |||
{ | |||
internal class BackButtonNavigationController : VRUINavigationController | |||
{ | |||
public event Action didFinishEvent; | |||
private Button _backButton; | |||
protected override void DidActivate(bool firstActivation, ActivationType activationType) | |||
{ | |||
if (firstActivation && activationType == ActivationType.AddedToHierarchy) | |||
{ | |||
_backButton = BeatSaberUI.CreateBackButton(rectTransform, didFinishEvent.Invoke); | |||
} | |||
} | |||
} | |||
} |
@ -1,190 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Diagnostics; | |||
using System.IO; | |||
using System.Linq; | |||
using CustomUI.BeatSaber; | |||
using CustomUI.Utilities; | |||
using HMUI; | |||
using IPA.Updating.BeatMods; | |||
using TMPro; | |||
using UnityEngine; | |||
using UnityEngine.UI; | |||
using VRUI; | |||
namespace BSIPA_ModList.UI.ViewControllers | |||
{ | |||
// originally ripped verbatim from Andruzz's BeatSaverDownloader | |||
internal class DownloadProgressViewController : VRUIViewController, TableView.IDataSource | |||
{ | |||
private TextMeshProUGUI _titleText; | |||
private TextMeshProUGUI _manualDownloadText; | |||
private Button _checkForUpdates; | |||
private Button _downloadUpdates; | |||
private Button _restartGame; | |||
private TableView _currentlyUpdatingTableView; | |||
private LevelListTableCell _songListTableCellInstance; | |||
private Button _pageUpButton; | |||
private Button _pageDownButton; | |||
private TableViewScroller _scroller; | |||
private const float TableXOffset = 0f; | |||
private const float ButtonXOffset = 36f; | |||
private static readonly Vector2 ButtonSize = new Vector2(40f, 10f); | |||
protected override void DidActivate(bool firstActivation, ActivationType type) | |||
{ | |||
if (firstActivation && type == ActivationType.AddedToHierarchy) | |||
{ | |||
DownloadController.Instance.OnDownloaderListChanged -= Refresh; | |||
DownloadController.Instance.OnDownloadStateChanged -= DownloaderStateChanged; | |||
_songListTableCellInstance = Resources.FindObjectsOfTypeAll<LevelListTableCell>().First(x => (x.name == "LevelListTableCell")); | |||
_titleText = BeatSaberUI.CreateText(rectTransform, "DOWNLOAD QUEUE", new Vector2(0f, 35f)); | |||
_titleText.alignment = TextAlignmentOptions.Top; | |||
_titleText.fontSize = 6f; | |||
_manualDownloadText = BeatSaberUI.CreateText(rectTransform, "Manual Restart Required", new Vector2(37f, -3f)); | |||
_manualDownloadText.alignment = TextAlignmentOptions.Top; | |||
_manualDownloadText.fontSize = 4f; | |||
_manualDownloadText.gameObject.SetActive(false); | |||
_pageUpButton = Instantiate(Resources.FindObjectsOfTypeAll<Button>().Last(x => (x.name == "PageUpButton")), rectTransform, false); | |||
(_pageUpButton.transform as RectTransform).anchorMin = new Vector2(0.5f, 1f); | |||
(_pageUpButton.transform as RectTransform).anchorMax = new Vector2(0.5f, 1f); | |||
(_pageUpButton.transform as RectTransform).anchoredPosition = new Vector2(TableXOffset, -14f); | |||
(_pageUpButton.transform as RectTransform).sizeDelta = new Vector2(40f, 10f); | |||
_pageUpButton.interactable = true; | |||
_pageUpButton.onClick.AddListener(delegate () | |||
{ | |||
_scroller.PageScrollUp(); | |||
}); | |||
_pageDownButton = Instantiate(Resources.FindObjectsOfTypeAll<Button>().First(x => (x.name == "PageDownButton")), rectTransform, false); | |||
(_pageDownButton.transform as RectTransform).anchorMin = new Vector2(0.5f, 0f); | |||
(_pageDownButton.transform as RectTransform).anchorMax = new Vector2(0.5f, 0f); | |||
(_pageDownButton.transform as RectTransform).anchoredPosition = new Vector2(TableXOffset, 8f); | |||
(_pageDownButton.transform as RectTransform).sizeDelta = new Vector2(40f, 10f); | |||
_pageDownButton.interactable = true; | |||
_pageDownButton.onClick.AddListener(delegate () | |||
{ | |||
_scroller.PageScrollDown(); | |||
}); | |||
var gobj = new GameObject("DownloadTable"); | |||
gobj.SetActive(false); | |||
_currentlyUpdatingTableView = gobj.AddComponent<TableView>(); | |||
_currentlyUpdatingTableView.transform.SetParent(rectTransform, false); | |||
_currentlyUpdatingTableView.SetPrivateField("_isInitialized", false); | |||
_currentlyUpdatingTableView.SetPrivateField("_preallocatedCells", new TableView.CellsGroup[0]); | |||
var viewport = new GameObject("Viewport").AddComponent<RectTransform>(); | |||
viewport.SetParent(gobj.GetComponent<RectTransform>(), false); | |||
gobj.GetComponent<ScrollRect>().viewport = viewport; | |||
/*RectMask2D viewportMask = Instantiate(Resources.FindObjectsOfTypeAll<RectMask2D>().First(), _currentlyUpdatingTableView.transform, false); | |||
viewportMask.transform.DetachChildren(); | |||
_currentlyUpdatingTableView.GetComponentsInChildren<RectTransform>().First(x => x.name == "Content").transform.SetParent(viewportMask.rectTransform, false);*/ | |||
(_currentlyUpdatingTableView.transform as RectTransform).anchorMin = new Vector2(0.3f, 0.5f); | |||
(_currentlyUpdatingTableView.transform as RectTransform).anchorMax = new Vector2(0.7f, 0.5f); | |||
(_currentlyUpdatingTableView.transform as RectTransform).sizeDelta = new Vector2(0f, 60f); | |||
(_currentlyUpdatingTableView.transform as RectTransform).anchoredPosition = new Vector3(TableXOffset, -20f); | |||
ReflectionUtil.SetPrivateField(_currentlyUpdatingTableView, "_pageUpButton", _pageUpButton); | |||
ReflectionUtil.SetPrivateField(_currentlyUpdatingTableView, "_pageDownButton", _pageDownButton); | |||
_currentlyUpdatingTableView.selectionType = TableViewSelectionType.None; | |||
_currentlyUpdatingTableView.Init(); | |||
_currentlyUpdatingTableView.dataSource = this; // calls Init | |||
_scroller = gobj.GetComponent<TableViewScroller>(); | |||
gobj.SetActive(true); | |||
gobj.GetComponent<ScrollRect>().content.anchorMax = new Vector2(.6f, 1f); | |||
_currentlyUpdatingTableView.RefreshScrollButtons(); | |||
_checkForUpdates = BeatSaberUI.CreateUIButton(rectTransform, "CreditsButton", new Vector2(ButtonXOffset, -30f), ButtonSize, CheckUpdates, "Check for updates"); | |||
_checkForUpdates.interactable = DownloadController.Instance.CanCheck || DownloadController.Instance.CanReset; | |||
_checkForUpdates.ToggleWordWrapping(false); | |||
_downloadUpdates = BeatSaberUI.CreateUIButton(rectTransform, "CreditsButton", new Vector2(ButtonXOffset, -19f), ButtonSize, DownloadUpdates, "Download Updates"); | |||
_downloadUpdates.interactable = DownloadController.Instance.CanDownload; | |||
_downloadUpdates.ToggleWordWrapping(false); | |||
_restartGame = BeatSaberUI.CreateUIButton(rectTransform, "CreditsButton", new Vector2(ButtonXOffset, -8f), ButtonSize, Restart, "Restart Game"); | |||
_restartGame.interactable = DownloadController.Instance.HadUpdates; | |||
_restartGame.ToggleWordWrapping(false); | |||
} | |||
DownloadController.Instance.OnDownloaderListChanged += Refresh; | |||
DownloadController.Instance.OnDownloadStateChanged += DownloaderStateChanged; | |||
DownloaderStateChanged(); | |||
} | |||
private void Restart() | |||
{ | |||
Process.Start(Path.Combine(Environment.CurrentDirectory, Process.GetCurrentProcess().MainModule.FileName), Environment.CommandLine); | |||
Application.Quit(); | |||
} | |||
private void DownloadUpdates() | |||
{ | |||
if (DownloadController.Instance.CanDownload) | |||
DownloadController.Instance.StartDownloads(); | |||
} | |||
private void CheckUpdates() | |||
{ | |||
Updater.ResetRequestCache(); | |||
if (DownloadController.Instance.CanReset) | |||
DownloadController.Instance.ResetCheck(false); | |||
if (DownloadController.Instance.CanCheck) | |||
DownloadController.Instance.CheckForUpdates(); | |||
} | |||
private void DownloaderStateChanged() | |||
{ | |||
_checkForUpdates.interactable = (DownloadController.Instance.CanCheck || DownloadController.Instance.CanReset) && !Updater.NeedsManualRestart; | |||
_downloadUpdates.interactable = DownloadController.Instance.CanDownload && !Updater.NeedsManualRestart; | |||
_restartGame.interactable = DownloadController.Instance.HadUpdates && !Updater.NeedsManualRestart; | |||
_manualDownloadText.gameObject.SetActive(Updater.NeedsManualRestart); | |||
} | |||
protected override void DidDeactivate(DeactivationType type) | |||
{ | |||
DownloadController.Instance.OnDownloaderListChanged -= Refresh; | |||
DownloadController.Instance.OnDownloadStateChanged -= DownloaderStateChanged; | |||
if (DownloadController.Instance.IsDone) | |||
FloatingNotification.instance.Close(); | |||
} | |||
private void Refresh() | |||
{ | |||
_currentlyUpdatingTableView.ReloadData(); | |||
} | |||
public float CellSize() | |||
{ | |||
return 8.5f; | |||
} | |||
public int NumberOfCells() | |||
{ | |||
return DownloadController.Instance.Downloads.Count; | |||
} | |||
public TableCell CellForIdx(TableView view, int row) | |||
{ | |||
LevelListTableCell _tableCell = Instantiate(_songListTableCellInstance); | |||
DownloadProgressCell _queueCell = _tableCell.gameObject.AddComponent<DownloadProgressCell>(); | |||
_queueCell.Init(DownloadController.Instance.Downloads[row]); | |||
return _queueCell; | |||
} | |||
} | |||
} |
@ -1,832 +0,0 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using UnityEngine; | |||
using CommonMark; | |||
using CommonMark.Syntax; | |||
using UnityEngine.UI; | |||
using TMPro; | |||
using CustomUI.BeatSaber; | |||
using IPA.Utilities; | |||
using System.Reflection; | |||
using UnityEngine.EventSystems; | |||
using System.Diagnostics; | |||
using System.Collections; | |||
using System.IO; | |||
using System.Text; | |||
using System.Text.RegularExpressions; | |||
namespace BSIPA_ModList.UI.ViewControllers | |||
{ | |||
/// <summary> | |||
/// A UI component that renders CommonMark Markdown in-game. | |||
/// </summary> | |||
[RequireComponent(typeof(RectTransform))] | |||
public class MarkdownView : MonoBehaviour | |||
{ | |||
private class TagTypeComponent : MonoBehaviour | |||
{ | |||
internal BlockTag Tag; | |||
internal HeadingData hData; | |||
internal ListData lData; | |||
internal int listCount; | |||
internal int listIndex; | |||
} | |||
private string markdown = ""; | |||
private bool mdDirty = false; | |||
/// <summary> | |||
/// The text to be rendered. | |||
/// </summary> | |||
/// <remarks> | |||
/// When this is assigned, the object is marked dirty. It will re-render on the next Update tick. | |||
/// </remarks> | |||
/// <value>the text to render as Markdown</value> | |||
public string Markdown | |||
{ | |||
get => markdown; | |||
set | |||
{ | |||
markdown = value; | |||
mdDirty = true; | |||
} | |||
} | |||
/// <summary> | |||
/// A convenience property to access the <see cref="RectTransform"/> on the <see cref="GameObject"/> this is on. | |||
/// </summary> | |||
/// <value>the <see cref="RectTransform"/> associated with this component</value> | |||
public RectTransform rectTransform => GetComponent<RectTransform>(); | |||
private ScrollView scrView; | |||
private RectTransform content; | |||
private RectTransform viewport; | |||
private CommonMarkSettings settings; | |||
/// <summary> | |||
/// Creates a new <see cref="MarkdownView"/>. Should never be called directly. Instead, use <see cref="GameObject.AddComponent{T}"/>. | |||
/// </summary> | |||
public MarkdownView() | |||
{ | |||
settings = CommonMarkSettings.Default.Clone(); | |||
settings.AdditionalFeatures = CommonMarkAdditionalFeatures.All; | |||
settings.RenderSoftLineBreaksAsLineBreaks = false; | |||
settings.UriResolver = ResolveUri; | |||
} | |||
/// <summary> | |||
/// This function will be called whenever attempting to resolve an image URI, to ensure that the image exists in the embedded assembly. | |||
/// </summary> | |||
/// <value>a delegate for the function to call</value> | |||
public Func<string, bool> HasEmbeddedImage; | |||
private string ResolveUri(string arg) | |||
{ | |||
var name = arg.Substring(3); | |||
if (!arg.StartsWith("!::") && !arg.StartsWith("w::")) | |||
{ // !:: means embedded, w:: means web | |||
// this block is for when neither is specified | |||
Logger.md.Debug($"Resolving nonspecific URI {arg}"); | |||
// check if its embedded | |||
if (HasEmbeddedImage != null && HasEmbeddedImage(arg)) | |||
return "!::" + arg; | |||
else | |||
return "w::" + arg; | |||
} | |||
Logger.md.Debug($"Resolved specific URI {arg}"); | |||
return arg; | |||
} | |||
private static string GetLinkUri(string uri) | |||
{ | |||
if (uri[0] == '!') | |||
{ | |||
Logger.md.Error($"Cannot link to embedded resource in mod description"); | |||
return null; | |||
} | |||
else | |||
return uri.Substring(3); | |||
} | |||
private static Stream ConsolasAssetBundleFontStream => Assembly.GetExecutingAssembly().GetManifestResourceStream("BSIPA_ModList.Bundles.consolas.font"); | |||
private static AssetBundleCreateRequest _bundleRequest; | |||
private static AssetBundle _bundle; | |||
private static AssetBundle Bundle | |||
{ | |||
get | |||
{ | |||
if (_bundle == null && _bundleRequest != null) | |||
throw new InvalidOperationException("Asset bundle is being loaded asynchronously; please wait for that to complete"); | |||
if (_bundle == null) | |||
_bundle = AssetBundle.LoadFromStream(ConsolasAssetBundleFontStream); | |||
return _bundle; | |||
} | |||
} | |||
private static AssetBundleRequest _consolasRequest; | |||
private static TMP_FontAsset _unsetConsolas; | |||
private static TMP_FontAsset _consolas; | |||
private static TMP_FontAsset Consolas | |||
{ | |||
get | |||
{ | |||
if (_unsetConsolas == null && _consolasRequest != null) | |||
throw new InvalidOperationException("Asset is being loaded asynchronously; please wait for that to complete"); | |||
if (_unsetConsolas == null) | |||
_unsetConsolas = Bundle?.LoadAsset<TMP_FontAsset>("CONSOLAS"); | |||
if (_consolas == null && _unsetConsolas != null) | |||
_consolas = SetupFont(_unsetConsolas); | |||
return _consolas; | |||
} | |||
} | |||
private static TMP_FontAsset SetupFont(TMP_FontAsset f) | |||
{ | |||
var originalFont = Resources.FindObjectsOfTypeAll<TMP_FontAsset>().Last(f2 => f2.name == "Teko-Medium SDF No Glow"); | |||
var matCopy = Instantiate(originalFont.material); | |||
matCopy.mainTexture = f.material.mainTexture; | |||
matCopy.mainTextureOffset = f.material.mainTextureOffset; | |||
matCopy.mainTextureScale = f.material.mainTextureScale; | |||
f.material = matCopy; | |||
f = Instantiate(f); | |||
MaterialReferenceManager.AddFontAsset(f); | |||
return f; | |||
} | |||
internal static void StartLoadResourcesAsync() | |||
{ | |||
SharedCoroutineStarter.instance.StartCoroutine(LoadResourcesAsync()); | |||
} | |||
private static IEnumerator LoadResourcesAsync() | |||
{ | |||
Logger.md.Debug("Starting to load resources"); | |||
_bundleRequest = AssetBundle.LoadFromStreamAsync(ConsolasAssetBundleFontStream); | |||
yield return _bundleRequest; | |||
_bundle = _bundleRequest.assetBundle; | |||
Logger.md.Debug("Bundle loaded"); | |||
_consolasRequest = _bundle.LoadAssetAsync<TMP_FontAsset>("CONSOLAS"); | |||
yield return _consolasRequest; | |||
_unsetConsolas = _consolasRequest.asset as TMP_FontAsset; | |||
Logger.md.Debug("Font loaded"); | |||
} | |||
internal void Awake() | |||
{ | |||
if (Consolas == null) | |||
Logger.md.Error($"Loading of Consolas font failed"); | |||
gameObject.SetActive(false); | |||
var vpgo = new GameObject("Viewport"); | |||
viewport = vpgo.AddComponent<RectTransform>(); | |||
viewport.SetParent(transform); | |||
viewport.localPosition = Vector2.zero; | |||
viewport.anchorMin = Vector2.zero; | |||
viewport.anchorMax = Vector2.one; | |||
viewport.anchoredPosition = new Vector2(.5f, .5f); | |||
viewport.sizeDelta = Vector2.zero; | |||
var vpmask = vpgo.AddComponent<Mask>(); | |||
var vpim = vpgo.AddComponent<Image>(); // supposedly Mask needs an Image? | |||
vpmask.showMaskGraphic = false; | |||
vpim.color = Color.white; | |||
vpim.sprite = WhitePixel; | |||
vpim.material = CustomUI.Utilities.UIUtilities.NoGlowMaterial; | |||
content = new GameObject("Content Wrapper").AddComponent<RectTransform>(); | |||
content.SetParent(viewport); | |||
content.gameObject.AddComponent<TagTypeComponent>(); | |||
content.localPosition = Vector2.zero; | |||
content.anchorMin = new Vector2(0f, 1f); | |||
content.anchorMax = new Vector2(1f, 1f); | |||
content.anchoredPosition = Vector2.zero; | |||
var contentLayout = content.gameObject.AddComponent<VerticalLayoutGroup>(); | |||
var contentFitter = content.gameObject.AddComponent<ContentSizeFitter>(); | |||
contentFitter.horizontalFit = ContentSizeFitter.FitMode.PreferredSize; | |||
contentFitter.verticalFit = ContentSizeFitter.FitMode.PreferredSize; | |||
contentLayout.childControlHeight = true; | |||
contentLayout.childControlWidth = false; | |||
contentLayout.childForceExpandHeight = false; | |||
contentLayout.childForceExpandWidth = true; | |||
contentLayout.childAlignment = TextAnchor.UpperCenter; | |||
contentLayout.spacing = 0f; | |||
var pageUp = Instantiate(Resources.FindObjectsOfTypeAll<Button>().Last((Button x) => x.name == "PageUpButton"), rectTransform, false); | |||
var pageDown = Instantiate(Resources.FindObjectsOfTypeAll<Button>().Last((Button x) => x.name == "PageDownButton"), rectTransform, false); | |||
{ | |||
var pup_rt = pageUp.transform as RectTransform; | |||
var pup_sof = pup_rt.sizeDelta.y; | |||
var pup_xoff = (rectTransform.sizeDelta.x / 2) + (pup_sof / 2); | |||
pup_rt.anchoredPosition = new Vector2(pup_xoff, pup_rt.anchoredPosition.y); | |||
var pup_bg_rt = pup_rt.Find("BG") as RectTransform; | |||
pup_bg_rt.sizeDelta = new Vector2(pup_bg_rt.sizeDelta.y, pup_bg_rt.sizeDelta.y); | |||
// fix hitbox | |||
pup_rt.anchorMin = new Vector2(.5f, pup_rt.anchorMin.y); | |||
pup_rt.anchorMax = new Vector2(.5f, pup_rt.anchorMax.y); | |||
pup_rt.sizeDelta = new Vector2(pup_rt.sizeDelta.y, pup_rt.sizeDelta.y); | |||
} | |||
{ | |||
var pdn_rt = pageDown.transform as RectTransform; | |||
var pdn_sof = pdn_rt.sizeDelta.y; | |||
var pdn_xoff = (rectTransform.sizeDelta.x / 2) + (pdn_sof / 2); | |||
pdn_rt.anchoredPosition = new Vector2(pdn_xoff, pdn_rt.anchoredPosition.y); | |||
var pdn_bg_rt = pdn_rt.Find("BG") as RectTransform; | |||
pdn_bg_rt.sizeDelta = new Vector2(pdn_bg_rt.sizeDelta.y, pdn_bg_rt.sizeDelta.y); | |||
// fix hitbox | |||
pdn_rt.anchorMin = new Vector2(.5f, pdn_rt.anchorMin.y); | |||
pdn_rt.anchorMax = new Vector2(.5f, pdn_rt.anchorMax.y); | |||
pdn_rt.sizeDelta = new Vector2(pdn_rt.sizeDelta.y, pdn_rt.sizeDelta.y); | |||
} | |||
scrView = gameObject.AddComponent<ScrollView>(); | |||
scrView.SetField("_pageUpButton", pageUp); | |||
scrView.SetField("_pageDownButton", pageDown); | |||
scrView.SetField("_contentRectTransform", content); | |||
scrView.SetField("_viewport", viewport); | |||
gameObject.SetActive(true); | |||
} | |||
private static Sprite whitePixel; | |||
private static Sprite WhitePixel | |||
{ | |||
get | |||
{ | |||
if (whitePixel == null) | |||
whitePixel = Resources.FindObjectsOfTypeAll<Sprite>().First(s => s.name == "WhitePixel"); | |||
return whitePixel; | |||
} | |||
} | |||
private static Sprite blockQuoteBackground; | |||
private static Sprite BlockQuoteBackground | |||
{ | |||
get | |||
{ | |||
if (blockQuoteBackground == null) | |||
blockQuoteBackground = Resources.FindObjectsOfTypeAll<Sprite>().First(s => s.name == "RoundRectNormal"); | |||
return blockQuoteBackground; | |||
} | |||
} | |||
private static readonly Color BlockQuoteColor = new Color( 30f / 255, 109f / 255, 178f / 255, .25f); | |||
private static readonly Color BlockCodeColor = new Color(135f / 255, 135f / 255, 135f / 255, .5f); | |||
#if DEBUG | |||
#if UI_CONFIGURE_MARKDOWN_THEMATIC_BREAK | |||
private byte tbreakSettings = 0; | |||
#endif | |||
#endif | |||
internal void Update() | |||
{ | |||
#if DEBUG && UI_CONFIGURE_MARKDOWN_THEMATIC_BREAK | |||
if (Input.GetKeyDown(KeyCode.K)) | |||
{ | |||
tbreakSettings = (byte)((tbreakSettings + 1) % 16); | |||
UpdateMd(); | |||
Logger.md.Info(tbreakSettings.ToString()); | |||
} | |||
#endif | |||
if (mdDirty) | |||
StartCoroutine(UpdateMd()); | |||
} | |||
[Flags] | |||
private enum CurrentTextFlags | |||
{ | |||
None = 0, Bold = 1, Italic = 2, Underline = 4, Strikethrough = 8, | |||
} | |||
private const string LinkDefaultColor = "#59B0F4"; | |||
// private const string LinkHoverColor = "#009dff"; | |||
private static readonly Regex linkRefTitleColorRegex = new Regex(@"\{\s*color:\s*#?([a-fA-F0-9]{6})\s*\}", RegexOptions.Compiled | RegexOptions.Singleline); | |||
const float PSize = 3.5f; | |||
const float BlockCodeSize = PSize - .5f; | |||
const float H1Size = 5.5f; | |||
const float HLevelDecrease = 0.5f; | |||
private IEnumerator UpdateMd() | |||
{ | |||
mdDirty = false; | |||
Clear(); | |||
// enable so it will set stuff up | |||
content.gameObject.GetComponent<VerticalLayoutGroup>().enabled = true; | |||
var doc = CommonMarkConverter.Parse(markdown, settings); | |||
Stack<RectTransform> layout = new Stack<RectTransform>(); | |||
layout.Push(content); | |||
TextMeshProUGUI currentText = null; | |||
List<TextMeshProUGUI> texts = new List<TextMeshProUGUI>(); | |||
CurrentTextFlags textFlags = 0; | |||
foreach (var node in doc.AsEnumerable()) | |||
{ | |||
Logger.md.Debug($"node {node}"); | |||
if (node.Block != null) | |||
{ | |||
var block = node.Block; | |||
const float BreakHeight = .5f; | |||
const int TextInset = 1; | |||
const int BlockQuoteInset = TextInset * 2; | |||
const int BlockCodeInset = BlockQuoteInset; | |||
const int ListInset = TextInset; | |||
void Spacer(float size = 1.5f) | |||
{ | |||
var go = new GameObject("Spacer", typeof(RectTransform)); | |||
var vlayout = go.GetComponent<RectTransform>(); | |||
vlayout.SetParent(layout.Peek()); | |||
vlayout.anchorMin = new Vector2(.5f, .5f); | |||
vlayout.anchorMax = new Vector2(.5f, .5f); | |||
vlayout.localScale = Vector3.one; | |||
vlayout.localPosition = Vector3.zero; | |||
var l = go.AddComponent<LayoutElement>(); | |||
l.minHeight = l.preferredHeight = size; | |||
} | |||
HorizontalOrVerticalLayoutGroup BlockNode(string name, float spacing, bool isVertical, Action<TagTypeComponent> apply = null, float? spacer = null, bool isDoc = false, bool matchWidth = false, float matchWidthDiff = 0f) | |||
{ | |||
if (node.IsOpening) | |||
{ | |||
Logger.md.Debug($"Creating block container {name}"); | |||
currentText = null; | |||
var go = new GameObject(name, typeof(RectTransform)); | |||
var vlayout = go.GetComponent<RectTransform>(); | |||
vlayout.SetParent(layout.Peek()); | |||
//vlayout.anchoredPosition = new Vector2(.5f, .5f); | |||
vlayout.anchorMin = new Vector2(.5f, .5f); | |||
vlayout.anchorMax = new Vector2(.5f, .5f); | |||
vlayout.localScale = Vector3.one; | |||
vlayout.localPosition = Vector3.zero; | |||
if (isDoc) | |||
{ | |||
vlayout.sizeDelta = new Vector2(rectTransform.rect.width, 0f); | |||
vlayout.anchorMin = new Vector2(0f, 1f); | |||
vlayout.anchorMax = new Vector2(1f, 1f); | |||
} | |||
if (matchWidth) | |||
vlayout.sizeDelta = new Vector2(layout.Peek().rect.width-matchWidthDiff, 0f); | |||
var tt = go.AddComponent<TagTypeComponent>(); | |||
tt.Tag = block.Tag; | |||
apply?.Invoke(tt); | |||
layout.Push(vlayout); | |||
HorizontalOrVerticalLayoutGroup l; | |||
if (isVertical) | |||
l = go.AddComponent<VerticalLayoutGroup>(); | |||
else | |||
l = go.AddComponent<HorizontalLayoutGroup>(); | |||
l.childControlHeight = l.childControlWidth = true; | |||
l.childForceExpandHeight = false; | |||
l.childForceExpandWidth = isDoc; | |||
l.spacing = spacing; | |||
if (isDoc) | |||
vlayout.anchoredPosition = new Vector2(0f, -vlayout.rect.height); | |||
return l; | |||
} | |||
else if (node.IsClosing) | |||
{ | |||
currentText = null; | |||
layout.Pop(); | |||
if (spacer.HasValue) | |||
Spacer(spacer.Value); | |||
} | |||
return null; | |||
} | |||
void ThematicBreak(float spacerSize = 1.5f) | |||
{ // TODO: Fix positioning | |||
var go = new GameObject("ThematicBreak", typeof(RectTransform), typeof(HorizontalLayoutGroup)); | |||
var vlayout = go.GetComponent<RectTransform>(); | |||
vlayout.SetParent(layout.Peek()); | |||
var l = go.GetComponent<HorizontalLayoutGroup>(); | |||
#if DEBUG && UI_CONFIGURE_MARKDOWN_THEMATIC_BREAK | |||
l.childControlHeight = (tbreakSettings & 0b0001) != 0; // if set, not well behaved | |||
l.childControlWidth = (tbreakSettings & 0b0010) != 0; | |||
l.childForceExpandHeight = (tbreakSettings & 0b0100) != 0; // if set, not well behaved | |||
l.childForceExpandWidth = (tbreakSettings & 0b1000) != 0; | |||
#else | |||
l.childControlHeight = false; | |||
l.childControlWidth = false; | |||
l.childForceExpandHeight = false; | |||
l.childForceExpandWidth = false; | |||
#endif | |||
l.childAlignment = TextAnchor.UpperCenter; | |||
l.spacing = 0f; | |||
vlayout.localScale = Vector3.one; | |||
vlayout.anchoredPosition = Vector2.zero; | |||
vlayout.anchorMin = new Vector2(.5f, .5f); | |||
vlayout.anchorMax = new Vector2(.5f, .5f); | |||
vlayout.sizeDelta = new Vector2(layout.Peek().rect.width, BreakHeight); | |||
vlayout.localPosition = Vector3.zero; | |||
currentText = null; | |||
go = new GameObject("ThematicBreak Bar", typeof(RectTransform), typeof(Image), typeof(LayoutElement)); | |||
var im = go.GetComponent<Image>(); | |||
im.color = Color.white; | |||
// i think i need to copy the sprite because i'm using the same one for the mask | |||
im.sprite = Sprite.Create(WhitePixel.texture, WhitePixel.rect, Vector2.zero); | |||
im.material = CustomUI.Utilities.UIUtilities.NoGlowMaterial; | |||
var rt = go.GetComponent<RectTransform>(); | |||
rt.SetParent(vlayout); | |||
var le = go.GetComponent<LayoutElement>(); | |||
le.minWidth = le.preferredWidth = layout.Peek().rect.width; | |||
le.minHeight = le.preferredHeight = BreakHeight; | |||
le.flexibleHeight = le.flexibleWidth = 1f; | |||
rt.localScale = Vector3.one; | |||
rt.localPosition = Vector3.zero; | |||
rt.anchoredPosition = Vector3.zero; | |||
rt.anchorMin = Vector2.zero; | |||
rt.anchorMax = Vector2.one; | |||
rt.sizeDelta = new Vector2(layout.Peek().rect.width, BreakHeight); | |||
if (spacerSize != 0f) | |||
Spacer(spacerSize); | |||
} | |||
switch (block.Tag) | |||
{ | |||
case BlockTag.Document: | |||
BlockNode("DocumentRoot", .5f, true, isDoc: true); | |||
break; | |||
case BlockTag.SetextHeading: | |||
var l = BlockNode("SeHeading", 0f, false, t => t.hData = block.Heading, spacer: 0f); | |||
if (l) | |||
{ | |||
l.childAlignment = TextAnchor.UpperCenter; | |||
l.padding = new RectOffset(TextInset, TextInset, 0, 0); | |||
} | |||
else | |||
ThematicBreak(2f); | |||
break; | |||
case BlockTag.AtxHeading: | |||
l = BlockNode("AtxHeading", .1f, false, t => t.hData = block.Heading); | |||
if (l) l.padding = new RectOffset(TextInset, TextInset, 0, 0); | |||
if (l && block.Heading.Level == 1) | |||
l.childAlignment = TextAnchor.UpperCenter; | |||
break; | |||
case BlockTag.Paragraph: | |||
l = BlockNode("Paragraph", .1f, false, spacer: 1.5f); | |||
if (l) l.padding = new RectOffset(TextInset, TextInset, 0, 0); | |||
break; | |||
case BlockTag.ThematicBreak: | |||
ThematicBreak(); | |||
break; | |||
// TODO: add the rest of the tag types | |||
case BlockTag.BlockQuote: | |||
l = BlockNode("BlockQuote", .1f, true, matchWidth: true, matchWidthDiff: BlockQuoteInset*2, spacer: 1.5f); | |||
if (l) | |||
{ | |||
l.childForceExpandWidth = true; | |||
l.padding = new RectOffset(BlockQuoteInset, BlockQuoteInset, BlockQuoteInset, 0); | |||
var go = l.gameObject; | |||
var im = go.AddComponent<Image>(); | |||
im.material = CustomUI.Utilities.UIUtilities.NoGlowMaterial; | |||
im.type = Image.Type.Sliced; | |||
im.sprite = Instantiate(BlockQuoteBackground); | |||
im.color = BlockQuoteColor; | |||
} | |||
break; | |||
case BlockTag.IndentedCode: | |||
case BlockTag.FencedCode: | |||
{ | |||
currentText = null; | |||
var go = new GameObject("CodeBlock", typeof(RectTransform)); | |||
var vlayout = go.GetComponent<RectTransform>(); | |||
vlayout.SetParent(layout.Peek()); | |||
vlayout.anchorMin = new Vector2(.5f, .5f); | |||
vlayout.anchorMax = new Vector2(.5f, .5f); | |||
vlayout.localScale = Vector3.one; | |||
vlayout.localPosition = Vector3.zero; | |||
vlayout.sizeDelta = new Vector2(layout.Peek().rect.width - BlockCodeInset * 2, 0f); | |||
var tt = go.AddComponent<TagTypeComponent>(); | |||
tt.Tag = block.Tag; | |||
l = go.AddComponent<VerticalLayoutGroup>(); | |||
l.childControlHeight = l.childControlWidth = true; | |||
l.childForceExpandHeight = false; | |||
l.childForceExpandWidth = true; | |||
l.spacing = 1.5f; | |||
l.padding = new RectOffset(BlockCodeInset, BlockCodeInset, BlockCodeInset, BlockCodeInset); | |||
var im = go.AddComponent<Image>(); | |||
im.material = CustomUI.Utilities.UIUtilities.NoGlowMaterial; | |||
im.type = Image.Type.Sliced; | |||
im.sprite = Instantiate(BlockQuoteBackground); | |||
im.color = BlockCodeColor; | |||
var text = BeatSaberUI.CreateText(vlayout, $"<noparse>{block.StringContent}</noparse>", Vector2.zero); | |||
text.fontSize = BlockCodeSize; | |||
text.font = Consolas; | |||
} | |||
break; | |||
case BlockTag.List: | |||
l = BlockNode("List", .05f, true, t => t.lData = block.ListData, matchWidth: true, matchWidthDiff: ListInset * 2, spacer: 1.5f); | |||
if (l) | |||
{ | |||
l.childForceExpandWidth = true; | |||
l.padding = new RectOffset(ListInset, ListInset, 0, 0); | |||
var go = l.gameObject; | |||
var tt = go.GetComponent<TagTypeComponent>(); | |||
// count up children | |||
var count = 0; | |||
for (var c = block.FirstChild; c != null; c = c.NextSibling) count++; | |||
tt.listCount = count; | |||
tt.listIndex = 0; | |||
} | |||
break; | |||
case BlockTag.ListItem: | |||
l = BlockNode("ListItem", .05f, false, matchWidth: true, spacer: null); | |||
if (l) | |||
{ // TODO: this is mega scuffed | |||
l.childForceExpandWidth = true; | |||
var go = l.gameObject; | |||
var rt = go.GetComponent<RectTransform>(); | |||
var tt = go.GetComponent<TagTypeComponent>(); | |||
var ptt = rt.parent.gameObject.GetComponent<TagTypeComponent>(); | |||
var index = ptt.listIndex++; | |||
var listCount = ptt.listCount; | |||
var maxNum = listCount + ptt.lData.Start; | |||
var numChars = (int)Math.Floor(Math.Log10(maxNum) + 1); | |||
var cNum = index + ptt.lData.Start; | |||
var lt = ptt.lData.ListType; | |||
var id = lt == ListType.Bullet ? ptt.lData.BulletChar.ToString() : (cNum + (ptt.lData.Delimiter == ListDelimiter.Parenthesis ? ")" : ".")); | |||
var ident = BeatSaberUI.CreateText(rt, $"<nobr>{id} </nobr>\n", Vector2.zero); | |||
if (lt == ListType.Ordered) // pad it out to fill space | |||
ident.text += $"<nobr><mspace=1em>{new string(' ', numChars + 1)}</mspace></nobr>"; | |||
var contGo = new GameObject("Content", typeof(RectTransform)); | |||
var vlayout = contGo.GetComponent<RectTransform>(); | |||
vlayout.SetParent(rt); | |||
vlayout.anchorMin = new Vector2(.5f, .5f); | |||
vlayout.anchorMax = new Vector2(.5f, .5f); | |||
vlayout.localScale = Vector3.one; | |||
vlayout.localPosition = Vector3.zero; | |||
//vlayout.sizeDelta = new Vector2(rt.rect.width, 0f); | |||
var tt2 = contGo.AddComponent<TagTypeComponent>(); | |||
tt2.Tag = block.Tag; | |||
var csf = contGo.AddComponent<ContentSizeFitter>(); | |||
csf.horizontalFit = ContentSizeFitter.FitMode.PreferredSize; | |||
csf.verticalFit = ContentSizeFitter.FitMode.Unconstrained; | |||
l = contGo.AddComponent<VerticalLayoutGroup>(); | |||
l.childAlignment = TextAnchor.UpperLeft; | |||
l.childControlHeight = l.childControlWidth = true; | |||
l.childForceExpandHeight = false; | |||
l.childForceExpandWidth = true; | |||
l.spacing = .5f; | |||
layout.Push(vlayout); | |||
} | |||
else | |||
layout.Pop(); // pop one more to clear content rect from stack | |||
break; | |||
case BlockTag.HtmlBlock: | |||
break; | |||
case BlockTag.ReferenceDefinition: // i have no idea what the state looks like here | |||
break; | |||
} | |||
} | |||
else if (node.Inline != null) | |||
{ // inline element | |||
var inl = node.Inline; | |||
void Flag(CurrentTextFlags flag) | |||
{ | |||
if (node.IsOpening) | |||
textFlags |= flag; | |||
else if (node.IsClosing) | |||
textFlags &= ~flag; | |||
} | |||
void EnsureText() | |||
{ | |||
if (currentText == null) | |||
{ | |||
Logger.md.Debug($"Adding new text element"); | |||
var tt = layout.Peek().gameObject.GetComponent<TagTypeComponent>(); | |||
currentText = BeatSaberUI.CreateText(layout.Peek(), "", Vector2.zero); | |||
currentText.gameObject.AddComponent<TextLinkDecoder>(); | |||
currentText.enableWordWrapping = true; | |||
switch (tt.Tag) | |||
{ | |||
case BlockTag.List: | |||
case BlockTag.ListItem: | |||
case BlockTag.Paragraph: | |||
currentText.fontSize = PSize; | |||
break; | |||
case BlockTag.AtxHeading: | |||
var size = H1Size; | |||
size -= HLevelDecrease * (tt.hData.Level - 1); | |||
currentText.fontSize = size; | |||
if (tt.hData.Level == 1) | |||
currentText.alignment = TextAlignmentOptions.Center; | |||
break; | |||
case BlockTag.SetextHeading: | |||
currentText.fontSize = H1Size; | |||
currentText.alignment = TextAlignmentOptions.Center; | |||
break; | |||
// TODO: add other relevant types | |||
} | |||
texts.Add(currentText); | |||
} | |||
} | |||
switch (inl.Tag) | |||
{ | |||
case InlineTag.String: | |||
EnsureText(); | |||
string head = "<noparse>", tail = "</noparse>"; | |||
if (textFlags.HasFlag(CurrentTextFlags.Bold)) | |||
{ head = "<b>" + head; tail += "</b>"; } | |||
if (textFlags.HasFlag(CurrentTextFlags.Italic)) | |||
{ head = "<i>" + head; tail += "</i>"; } | |||
if (textFlags.HasFlag(CurrentTextFlags.Strikethrough)) | |||
{ head = "<s>" + head; tail += "</s>"; } | |||
if (textFlags.HasFlag(CurrentTextFlags.Underline)) | |||
{ head = "<u>" + head; tail += "</u>"; } | |||
currentText.text += head + inl.LiteralContent + tail; | |||
break; | |||
case InlineTag.Strong: | |||
Flag(CurrentTextFlags.Bold); | |||
break; | |||
case InlineTag.Strikethrough: | |||
Flag(CurrentTextFlags.Strikethrough); | |||
break; | |||
case InlineTag.Emphasis: | |||
Flag(CurrentTextFlags.Italic); | |||
break; | |||
case InlineTag.Code: | |||
EnsureText(); | |||
currentText.text += $"<font=\"CONSOLAS\"><size=80%><mark=#A0A0C080><noparse>{inl.LiteralContent}</noparse></mark></size></font>"; | |||
break; | |||
case InlineTag.SoftBreak: | |||
EnsureText(); | |||
currentText.text += " "; // soft breaks translate to a space | |||
break; | |||
case InlineTag.LineBreak: | |||
EnsureText(); | |||
currentText.text += "\n"; // line breaks translate to a new line | |||
break; | |||
case InlineTag.Link: | |||
EnsureText(); | |||
Flag(CurrentTextFlags.Underline); | |||
var color = LinkDefaultColor; | |||
var targetUrl = ResolveUri(inl.TargetUrl); | |||
var m = linkRefTitleColorRegex.Match(inl.LiteralContent); | |||
if (m.Success) | |||
color = "#" + m.Groups[1].Value; | |||
if (node.IsOpening) | |||
currentText.text += $"<color={color}><link=\"{targetUrl}\">"; | |||
else if (node.IsClosing) | |||
currentText.text += "</link></color>"; | |||
break; | |||
case InlineTag.RawHtml: | |||
EnsureText(); | |||
currentText.text += inl.LiteralContent; | |||
break; | |||
case InlineTag.Placeholder: | |||
break; | |||
} | |||
} | |||
} | |||
yield return null; // delay one frame | |||
scrView.Setup(); | |||
// this is the bullshit I have to use to make it work properly | |||
content.gameObject.GetComponent<VerticalLayoutGroup>().enabled = false; | |||
var childRt = content.GetChild(0) as RectTransform; | |||
childRt.anchoredPosition = new Vector2(0f, childRt.anchoredPosition.y); | |||
} | |||
private class TextLinkDecoder : MonoBehaviour, IPointerClickHandler | |||
{ | |||
private TextMeshProUGUI tmp; | |||
public void Awake() | |||
{ | |||
tmp = GetComponent<TextMeshProUGUI>(); | |||
} | |||
public void OnPointerClick(PointerEventData eventData) | |||
{ | |||
// this may not actually get me what i want | |||
int linkIndex = TMP_TextUtilities.FindIntersectingLink(tmp, eventData.pointerPressRaycast.worldPosition, null); | |||
if (linkIndex != -1) | |||
{ // was a link clicked? | |||
TMP_LinkInfo linkInfo = tmp.textInfo.linkInfo[linkIndex]; | |||
// open the link id as a url, which is the metadata we added in the text field | |||
var qualifiedUrl = linkInfo.GetLinkID(); | |||
if (qualifiedUrl.StartsWith("$$")) | |||
return; // this means its used for something else | |||
Logger.md.Debug($"Link pressed {qualifiedUrl}"); | |||
var uri = GetLinkUri(qualifiedUrl); | |||
if (uri != null) | |||
Process.Start(uri); | |||
} | |||
} | |||
private List<Color32[]> SetLinkToColor(int linkIndex, Color32 color) | |||
{ | |||
TMP_LinkInfo linkInfo = tmp.textInfo.linkInfo[linkIndex]; | |||
var oldVertColors = new List<Color32[]>(); // store the old character colors | |||
for (int i = 0; i < linkInfo.linkTextLength; i++) | |||
{ // for each character in the link string | |||
int characterIndex = linkInfo.linkTextfirstCharacterIndex + i; // the character index into the entire text | |||
var charInfo = tmp.textInfo.characterInfo[characterIndex]; | |||
int meshIndex = charInfo.materialReferenceIndex; // Get the index of the material / sub text object used by this character. | |||
int vertexIndex = charInfo.vertexIndex; // Get the index of the first vertex of this character. | |||
Color32[] vertexColors = tmp.textInfo.meshInfo[meshIndex].colors32; // the colors for this character | |||
oldVertColors.Add(vertexColors.ToArray()); | |||
if (charInfo.isVisible) | |||
{ | |||
vertexColors[vertexIndex + 0] = color; | |||
vertexColors[vertexIndex + 1] = color; | |||
vertexColors[vertexIndex + 2] = color; | |||
vertexColors[vertexIndex + 3] = color; | |||
} | |||
} | |||
// Update Geometry | |||
tmp.UpdateVertexData(TMP_VertexDataUpdateFlags.All); | |||
return oldVertColors; | |||
} | |||
} | |||
private void Clear() | |||
{ | |||
content.gameObject.SetActive(false); | |||
void Clear(Transform target) | |||
{ | |||
foreach (Transform child in target) | |||
{ | |||
Clear(child); | |||
Logger.md.Debug($"Destroying {child.name}"); | |||
child.SetParent(null); | |||
Destroy(child.gameObject); | |||
} | |||
} | |||
Clear(content); | |||
content.gameObject.SetActive(true); | |||
} | |||
} | |||
} |
@ -1,283 +0,0 @@ | |||
using CustomUI.BeatSaber; | |||
using CustomUI.Utilities; | |||
using IPA.Loader; | |||
using IPA.Loader.Features; | |||
using IPA.Old; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using UnityEngine; | |||
namespace BSIPA_ModList.UI.ViewControllers | |||
{ | |||
internal interface IClickableCell | |||
{ | |||
void OnSelect(ModListController cntrl); | |||
void Update(); | |||
} | |||
internal class BSIPAModCell : CustomCellInfo, IClickableCell, IDisposable | |||
{ | |||
internal PluginLoader.PluginMetadata Plugin; | |||
private ModListController list; | |||
private PluginManager.PluginEnableDelegate enableDel; | |||
private PluginManager.PluginDisableDelegate disableDel; | |||
public BSIPAModCell(ModListController list, PluginLoader.PluginMetadata plugin) | |||
: base("", "", null) | |||
{ | |||
Plugin = plugin; | |||
this.list = list; | |||
var thisWeakRef = new WeakReference<BSIPAModCell>(this); | |||
PluginManager.PluginDisableDelegate reflessDDel = null; | |||
reflessDDel = disableDel = (p, r) => PluginManager_PluginDisabled(p, r, thisWeakRef, reflessDDel); // some indirection to make it a weak link for GC | |||
PluginManager.PluginDisabled += reflessDDel; | |||
PluginManager.PluginEnableDelegate reflessEDel = null; | |||
reflessEDel = enableDel = (p, r) => PluginManager_PluginEnabled(p, r, thisWeakRef, reflessEDel); // some indirection to make it a weak link for GC | |||
PluginManager.PluginEnabled += reflessEDel; | |||
Update(propogate: false); | |||
} | |||
private static void PluginManager_PluginEnabled(PluginLoader.PluginInfo plugin, bool needsRestart, WeakReference<BSIPAModCell> _self, PluginManager.PluginEnableDelegate ownDel) | |||
{ | |||
if (!_self.TryGetTarget(out var self)) | |||
{ | |||
PluginManager.PluginEnabled -= ownDel; | |||
return; | |||
} | |||
if (plugin.Metadata != self.Plugin) return; | |||
self.Update(true, needsRestart); | |||
} | |||
private static void PluginManager_PluginDisabled(PluginLoader.PluginMetadata plugin, bool needsRestart, WeakReference<BSIPAModCell> _self, PluginManager.PluginDisableDelegate ownDel) | |||
{ | |||
if (!_self.TryGetTarget(out var self)) | |||
{ | |||
PluginManager.PluginDisabled -= ownDel; | |||
return; | |||
} | |||
if (plugin != self.Plugin) return; | |||
self.Update(false, needsRestart); | |||
} | |||
private ModInfoViewController infoView; | |||
public void OnSelect(ModListController cntrl) | |||
{ | |||
Logger.log.Debug($"Selected BSIPAModCell {Plugin.Name} {Plugin.Version}"); | |||
if (infoView == null) | |||
{ | |||
var desc = Plugin.Manifest.Description; | |||
if (string.IsNullOrWhiteSpace(desc)) | |||
desc = "*No description*"; | |||
infoView = BeatSaberUI.CreateViewController<ModInfoViewController>(); | |||
infoView.Init(icon, Plugin.Name, "v" + Plugin.Version.ToString(), subtext, | |||
desc, Plugin, Plugin.Manifest.Links, true, list.flow); | |||
} | |||
list.flow.SetSelected(infoView, immediate: list.flow.HasSelected); | |||
} | |||
void IClickableCell.Update() => Update(null, false, false); | |||
public void Update(bool? _enabled = null, bool needsRestart = false, bool propogate = true) | |||
{ | |||
text = $"{Plugin.Name} <size=60%>v{Plugin.Version}"; | |||
subtext = Plugin.Manifest.Author; | |||
if (string.IsNullOrWhiteSpace(subtext)) | |||
subtext = "<color=#BFBFBF><i>Unspecified Author</i>"; | |||
var enabled = _enabled ?? !PluginManager.IsDisabled(Plugin); | |||
if (!enabled) | |||
subtext += " <color=#C2C2C2>- <i>Disabled</i>"; | |||
if (needsRestart) | |||
subtext += " <i>(Restart to apply)</i>"; | |||
icon = Plugin.GetIcon(); | |||
var desc = Plugin.Manifest.Description; | |||
if (string.IsNullOrWhiteSpace(desc)) | |||
desc = "*No description*"; | |||
infoView?.Reload(Plugin.Name, "v" + Plugin.Version.ToString(), subtext, desc); | |||
if (propogate) | |||
list.Reload(); | |||
} | |||
#region IDisposable Support | |||
private bool disposedValue = false; // To detect redundant calls | |||
protected virtual void Dispose(bool disposing) | |||
{ | |||
if (!disposedValue) | |||
{ | |||
if (disposing) | |||
{ | |||
PluginManager.PluginDisabled -= disableDel; | |||
PluginManager.PluginEnabled -= enableDel; | |||
} | |||
disposedValue = true; | |||
} | |||
} | |||
public void Dispose() | |||
{ | |||
Dispose(true); | |||
} | |||
#endregion | |||
} | |||
internal class BSIPAIgnoredModCell : CustomCellInfo, IClickableCell | |||
{ | |||
internal PluginLoader.PluginMetadata Plugin; | |||
private ModListController list; | |||
private const string authorFormat = "{0} <color=#BFBFBF>- <i>Not loaded</i>"; | |||
private string authorText; | |||
public BSIPAIgnoredModCell(ModListController list, PluginLoader.PluginMetadata plugin) | |||
: base($"<color=#878787>{plugin.Name} <size=60%>v{plugin.Version}", "", Utilities.DefaultBSIPAIcon) | |||
{ | |||
Plugin = plugin; | |||
this.list = list; | |||
if (string.IsNullOrWhiteSpace(plugin.Manifest.Author)) | |||
authorText = "<color=#BFBFBF><i>Unspecified Author</i>"; | |||
else | |||
authorText = plugin.Manifest.Author; | |||
subtext = string.Format(authorFormat, authorText); | |||
} | |||
private ModInfoViewController infoView; | |||
public void OnSelect(ModListController cntrl) | |||
{ | |||
Logger.log.Debug($"Selected BSIPAIgnoredModCell {Plugin.Name} {Plugin.Version}"); | |||
if (infoView == null) | |||
{ | |||
var desc = Plugin.Manifest.Description; | |||
if (string.IsNullOrWhiteSpace(desc)) | |||
desc = "*No description*"; | |||
infoView = BeatSaberUI.CreateViewController<ModInfoViewController>(); | |||
infoView.Init(icon, Plugin.Name, "v" + Plugin.Version.ToString(), authorText, | |||
desc, Plugin, Plugin.Manifest.Links); | |||
} | |||
list.flow.SetSelected(infoView, immediate: list.flow.HasSelected); | |||
} | |||
public void Update() | |||
{ | |||
} | |||
} | |||
internal class LibraryModCell : CustomCellInfo, IClickableCell | |||
{ | |||
internal PluginLoader.PluginMetadata Plugin; | |||
private ModListController list; | |||
public LibraryModCell(ModListController list, PluginLoader.PluginMetadata plugin) | |||
: base($"{plugin.Name} <size=60%>v{plugin.Version}", plugin.Manifest.Author, null) | |||
{ | |||
Plugin = plugin; | |||
this.list = list; | |||
if (string.IsNullOrWhiteSpace(subtext)) | |||
subtext = "<color=#BFBFBF><i>Unspecified Author</i></color>"; | |||
icon = Utilities.DefaultLibraryIcon; | |||
} | |||
private ModInfoViewController infoView; | |||
public void OnSelect(ModListController cntrl) | |||
{ | |||
Logger.log.Debug($"Selected LibraryModCell {Plugin.Name} {Plugin.Version}"); | |||
if (infoView == null) | |||
{ | |||
var desc = Plugin.Manifest.Description; | |||
if (string.IsNullOrWhiteSpace(desc)) | |||
desc = "*No description*"; | |||
infoView = BeatSaberUI.CreateViewController<ModInfoViewController>(); | |||
infoView.Init(icon, Plugin.Name, "v" + Plugin.Version.ToString(), subtext, | |||
desc, Plugin, Plugin.Manifest.Links); | |||
} | |||
list.flow.SetSelected(infoView, immediate: list.flow.HasSelected); | |||
} | |||
public void Update() | |||
{ | |||
} | |||
} | |||
#pragma warning disable CS0618 | |||
internal class IPAModCell : CustomCellInfo, IClickableCell | |||
{ | |||
internal IPlugin Plugin; | |||
private ModListController list; | |||
public IPAModCell(ModListController list, IPlugin plugin) | |||
: base($"{plugin.Name} <size=60%>{plugin.Version}", "<color=#BFBFBF><i>Legacy</i>", Utilities.DefaultIPAIcon) | |||
{ | |||
Plugin = plugin; | |||
this.list = list; | |||
} | |||
private ModInfoViewController infoView; | |||
public void OnSelect(ModListController cntrl) | |||
{ | |||
Logger.log.Debug($"Selected IPAModCell {Plugin.Name} {Plugin.Version}"); | |||
if (infoView == null) | |||
{ | |||
PluginLoader.PluginMetadata updateInfo = null; | |||
try | |||
{ | |||
updateInfo = new PluginLoader.PluginMetadata | |||
{ | |||
Name = Plugin.Name, | |||
Id = Plugin.Name, | |||
Version = new SemVer.Version(Plugin.Version) | |||
}; | |||
} | |||
catch (Exception e) | |||
{ | |||
Logger.log.Warn($"Could not generate fake update info for {Plugin.Name}"); | |||
Logger.log.Warn(e); | |||
} | |||
infoView = BeatSaberUI.CreateViewController<ModInfoViewController>(); | |||
infoView.Init(icon, Plugin.Name, "v" + Plugin.Version.ToString(), "<color=#BFBFBF><i>Unknown Author</i>", | |||
"This mod was written for IPA.\n===\n\n## No metadata is avaliable for this mod.\n\n" + | |||
"Please contact the mod author and ask them to port it to BSIPA to provide more information.", updateInfo); | |||
} | |||
list.flow.SetSelected(infoView, immediate: list.flow.HasSelected); | |||
} | |||
public void Update() | |||
{ | |||
} | |||
} | |||
#pragma warning restore | |||
} |
@ -1,439 +0,0 @@ | |||
using BSIPA_ModList.UI.ViewControllers; | |||
using CustomUI.BeatSaber; | |||
using CustomUI.MenuButton; | |||
using IPA.Loader; | |||
using IPA.Updating.BeatMods; | |||
using IPA.Utilities; | |||
using System; | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using System.Diagnostics; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using TMPro; | |||
using UnityEngine; | |||
using UnityEngine.UI; | |||
using VRUI; | |||
namespace BSIPA_ModList.UI | |||
{ | |||
internal class ModInfoViewController : VRUIViewController | |||
{ | |||
internal Sprite Icon; | |||
internal string Name; | |||
internal string Version; | |||
internal string Author; | |||
internal string Description; | |||
internal PluginLoader.PluginMetadata UpdateInfo; | |||
private static RectTransform rowTransformOriginal; | |||
private ModInfoView view; | |||
private RectTransform rowTransform; | |||
private Button linkHomeButton; | |||
private Button linkSourceButton; | |||
private Button linkDonateButton; | |||
private ModListFlowCoordinator flowController; | |||
private bool showEnableDisable = false; | |||
private TextMeshProUGUI restartMessage; | |||
private Button enableDisableButton; | |||
private new bool enabled = false; | |||
public void Init(Sprite icon, string name, string version, string author, string description, PluginLoader.PluginMetadata updateInfo, PluginManifest.LinksObject links = null, bool showEnDis = false, ModListFlowCoordinator mlfc = null) | |||
{ | |||
showEnableDisable = showEnDis; | |||
Plugin.OnConfigChaned -= OptHideButton; | |||
Icon = icon; | |||
Name = name; | |||
Version = version; | |||
Author = author; | |||
Description = description; | |||
UpdateInfo = updateInfo; | |||
enabled = !PluginManager.IsDisabled(updateInfo); | |||
flowController = mlfc; | |||
if (rowTransformOriginal == null) | |||
rowTransformOriginal = MenuButtonUI.Instance.GetField<RectTransform>("menuButtonsOriginal"); | |||
// i also have no clue why this is necessary | |||
rectTransform.anchorMin = new Vector2(0f, 0f); | |||
rectTransform.anchorMax = new Vector2(0.5f, 1f); | |||
var go = new GameObject("Info View", typeof(RectTransform)); | |||
go.SetActive(false); | |||
go.AddComponent<RectMask2D>(); | |||
view = go.AddComponent<ModInfoView>(); | |||
var rt = view.transform as RectTransform; | |||
rt.SetParent(transform); | |||
rt.anchorMin = new Vector2(0f, 0f); | |||
rt.anchorMax = new Vector2(1f, 1f); | |||
rt.anchoredPosition = new Vector2(0f, 0); | |||
view.Init(this); | |||
go.SetActive(true); | |||
if (showEnDis) | |||
{ | |||
restartMessage = BeatSaberUI.CreateText(rectTransform, "A restart is required to apply", new Vector2(11f, 33.5f)); | |||
restartMessage.fontSize = 4f; | |||
restartMessage.gameObject.SetActive(false); | |||
enableDisableButton = BeatSaberUI.CreateUIButton(rectTransform, "CreditsButton", new Vector2(33, 32), new Vector2(25, 10), ToggleEnable); | |||
enableDisableButton.GetComponentInChildren<StartMiddleEndButtonBackgroundController>().SetMiddleSprite(); | |||
UpdateButtonText(); | |||
Plugin.OnConfigChaned += OptHideButton; | |||
OptHideButton(Plugin.config.Value); | |||
} | |||
SetupLinks(links); | |||
} | |||
protected override void DidDeactivate(DeactivationType deactivationType) | |||
{ | |||
base.DidDeactivate(deactivationType); | |||
if (deactivationType == DeactivationType.RemovedFromHierarchy) | |||
Plugin.OnConfigChaned -= OptHideButton; | |||
} | |||
protected override void OnDestroy() | |||
{ | |||
Plugin.OnConfigChaned -= OptHideButton; | |||
base.OnDestroy(); | |||
} | |||
~ModInfoViewController() | |||
{ | |||
Plugin.OnConfigChaned -= OptHideButton; | |||
} | |||
private void OptHideButton(SelfConfig cfg) | |||
{ | |||
enableDisableButton?.gameObject?.SetActive(cfg.ShowEnableDisable); | |||
} | |||
private Action setAction = () => { }; | |||
private void ToggleEnable() | |||
{ | |||
var info = enabled ? PluginManager.InfoFromMetadata(UpdateInfo) : null; | |||
bool needsRestart; | |||
if (enabled) | |||
needsRestart = PluginManager.DisablePlugin(info); | |||
else | |||
needsRestart = PluginManager.EnablePlugin(UpdateInfo); | |||
UpdateButtonText(!enabled, needsRestart); | |||
if (!needsRestart) | |||
flowController.exitActions.Add(setAction); | |||
} | |||
private void UpdateButtonText(bool? _enabled = null, bool _needsRestart = false) | |||
{ | |||
enabled = _enabled ?? enabled; | |||
if (enabled) | |||
enableDisableButton.SetButtonText("Disable"); | |||
else | |||
enableDisableButton.SetButtonText("Enable"); | |||
restartMessage.gameObject.SetActive(_needsRestart); | |||
} | |||
public void Reload(string name, string version, string author, string description) | |||
{ | |||
Name = name; | |||
Version = version; | |||
Author = author; | |||
Description = description; | |||
view.Refresh(); | |||
} | |||
private void SetupLinks(PluginManifest.LinksObject links = null, Uri moreInfoLink = null) | |||
{ | |||
bool addedLink = false; | |||
if (links != null || moreInfoLink != null) | |||
{ | |||
Logger.log.Debug($"Adding links"); | |||
rowTransform = Instantiate(rowTransformOriginal, rectTransform); | |||
rowTransform.anchorMin = new Vector2(0f, 0f); | |||
rowTransform.anchorMax = new Vector2(1f, .15f); | |||
rowTransform.anchoredPosition = new Vector2(-3.5f, 4f); | |||
rowTransform.sizeDelta = Vector2.zero; | |||
Destroy(rowTransform.GetComponent<StartMiddleEndButtonsGroup>()); | |||
foreach (Transform child in rowTransform) | |||
{ | |||
child.name = string.Empty; | |||
Destroy(child.gameObject); | |||
} | |||
if (links?.ProjectHome != null) | |||
{ | |||
linkHomeButton = BeatSaberUI.CreateUIButton(rowTransform, "CreditsButton", buttonText: "Home", anchoredPosition: Vector2.zero, sizeDelta: new Vector2(20, 10), | |||
onClick: () => Process.Start(links.ProjectHome.ToString())); | |||
addedLink = true; | |||
} | |||
if (links?.ProjectSource != null) | |||
{ | |||
linkSourceButton = BeatSaberUI.CreateUIButton(rowTransform, "CreditsButton", buttonText: "Source", anchoredPosition: Vector2.zero, sizeDelta: new Vector2(20, 10), | |||
onClick: () => Process.Start(links.ProjectSource.ToString())); | |||
addedLink = true; | |||
} | |||
if (links?.Donate != null) | |||
{ | |||
linkDonateButton = BeatSaberUI.CreateUIButton(rowTransform, "CreditsButton", buttonText: "Donate", anchoredPosition: Vector2.zero, sizeDelta: new Vector2(20, 10), | |||
onClick: () => Process.Start(links.Donate.ToString())); | |||
addedLink = true; | |||
} | |||
if (moreInfoLink != null) | |||
{ | |||
linkDonateButton = BeatSaberUI.CreateUIButton(rowTransform, "CreditsButton", buttonText: "More Info", anchoredPosition: Vector2.zero, sizeDelta: new Vector2(20, 10), | |||
onClick: () => Process.Start(moreInfoLink.ToString())); | |||
addedLink = true; | |||
} | |||
foreach (var cmp in rowTransform.GetComponentsInChildren<StartMiddleEndButtonBackgroundController>()) | |||
cmp.SetMiddleSprite(); | |||
} | |||
if (UpdateInfo != null && !addedLink) | |||
StartCoroutine(GetMoreInfoLink()); | |||
} | |||
private IEnumerator GetMoreInfoLink() | |||
{ | |||
Logger.log.Debug($"Getting more info link"); | |||
Ref<ApiEndpoint.Mod> mod = new Ref<ApiEndpoint.Mod>(null); | |||
if (UpdateInfo.Id == null) yield break; | |||
yield return Updater.GetModInfo(UpdateInfo.Id, UpdateInfo.Version.ToString(), mod); | |||
try { mod.Verify(); } | |||
catch (Exception e) | |||
{ | |||
Logger.log.Warn($"Error getting more info link for mod {UpdateInfo.Id}"); | |||
Logger.log.Warn(e); | |||
yield break; | |||
} | |||
SetupLinks(null, mod.Value.Link); | |||
} | |||
#if DEBUG | |||
public void Update() | |||
{ | |||
#if ADJUST_INFO_BUTTON_UI_LINKS | |||
RectTransform rt = rowTransform; | |||
if (rt == null) return; | |||
var cpos = rt.anchoredPosition; | |||
if (Input.GetKey(KeyCode.LeftArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x - .1f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.RightArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x + .1f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.UpArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x, cpos.y + .1f); | |||
} | |||
else if (Input.GetKey(KeyCode.DownArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x, cpos.y - .1f); | |||
} | |||
else | |||
return; | |||
Logger.log.Debug($"Position now at {rt.anchoredPosition}"); | |||
#endif | |||
} | |||
#endif | |||
} | |||
internal class ModInfoView : MonoBehaviour | |||
{ | |||
private MarkdownView mdv; | |||
private TextMeshProUGUI titleText; | |||
private TextMeshProUGUI authorText; | |||
private Image icon; | |||
private ModInfoViewController controller; | |||
private const string TitleFormat = "{0} <size=60%>{1}"; | |||
public void Init(ModInfoViewController controller) | |||
{ | |||
this.controller = controller; | |||
var rectTransform = transform as RectTransform; | |||
rectTransform.sizeDelta = new Vector2(60f, 10f); | |||
titleText = BeatSaberUI.CreateText(rectTransform, string.Format(TitleFormat, controller.Name, controller.Version), new Vector2(11f, 27.5f)); | |||
titleText.fontSize = 6f; | |||
authorText = BeatSaberUI.CreateText(rectTransform, controller.Author, new Vector2(11f, 22f)); | |||
authorText.fontSize = 4.5f; | |||
var mdvgo = new GameObject("MarkDown Desc"); | |||
mdvgo.SetActive(false); | |||
mdv = mdvgo.AddComponent<MarkdownView>(); | |||
mdv.rectTransform.SetParent(rectTransform); | |||
mdv.rectTransform.anchorMin = new Vector2(.5f, .5f); | |||
mdv.rectTransform.anchorMax = new Vector2(.5f, .5f); | |||
mdv.rectTransform.anchoredPosition = new Vector2(-4f, -3.6f); | |||
mdv.rectTransform.sizeDelta = new Vector2(65f, 40f); | |||
mdvgo.SetActive(true); | |||
mdv.Markdown = controller.Description; | |||
icon = new GameObject("Mod Info View Icon", typeof(RectTransform)).AddComponent<Image>(); | |||
icon.gameObject.SetActive(false); | |||
icon.rectTransform.SetParent(rectTransform, false); | |||
icon.rectTransform.anchorMin = new Vector2(0.5f, 0.44f); | |||
icon.rectTransform.anchorMax = new Vector2(0.5f, 0.5f); | |||
icon.rectTransform.sizeDelta = new Vector2(60f, 10f); | |||
icon.rectTransform.anchoredPosition = new Vector2(-27.8f, 27.3f); | |||
icon.sprite = controller.Icon; | |||
icon.preserveAspect = true; | |||
icon.useSpriteMesh = true; | |||
icon.material = CustomUI.Utilities.UIUtilities.NoGlowMaterial; | |||
icon.gameObject.SetActive(true); | |||
} | |||
public void Refresh() | |||
{ | |||
titleText.text = string.Format(TitleFormat, controller.Name, controller.Version); | |||
authorText.text = controller.Author; | |||
mdv.Markdown = controller.Description; | |||
icon.sprite = controller.Icon; | |||
} | |||
#if DEBUG | |||
#if ADJUST_INFO_TEXT_UI_KEYS | |||
private int currentItem = 0; | |||
#endif | |||
public void Update() | |||
{ | |||
#if ADJUST_INFO_TEXT_UI_KEYS | |||
RectTransform rt; | |||
switch (currentItem) | |||
{ | |||
default: | |||
currentItem = 0; | |||
goto case 0; // idk why this is needed tbh | |||
case 0: | |||
rt = titleText.rectTransform; | |||
break; | |||
case 1: | |||
rt = authorText.rectTransform; | |||
break; | |||
case 2: | |||
rt = descText.rectTransform; | |||
break; | |||
} | |||
if (Input.GetKeyDown(KeyCode.N)) | |||
currentItem++; | |||
var cpos = rt.anchoredPosition; | |||
if (Input.GetKey(KeyCode.LeftArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x - .1f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.RightArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x + .1f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.UpArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x, cpos.y + .1f); | |||
} | |||
else if (Input.GetKey(KeyCode.DownArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x, cpos.y - .1f); | |||
} | |||
else | |||
return; | |||
Logger.log.Debug($"Position now at {rt.anchoredPosition}"); | |||
#endif | |||
#if ADJUST_INFO_ICON_UI_KEYS | |||
var rt = icon.rectTransform; | |||
if (Input.GetKey(KeyCode.Z)) | |||
{ // adjust anchormin | |||
var cpos = rt.anchorMin; | |||
if (Input.GetKey(KeyCode.LeftArrow)) | |||
{ | |||
rt.anchorMin = new Vector2(cpos.x - .001f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.RightArrow)) | |||
{ | |||
rt.anchorMin = new Vector2(cpos.x + .001f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.UpArrow)) | |||
{ | |||
rt.anchorMin = new Vector2(cpos.x, cpos.y + .001f); | |||
} | |||
else if (Input.GetKey(KeyCode.DownArrow)) | |||
{ | |||
rt.anchorMin = new Vector2(cpos.x, cpos.y - .001f); | |||
} | |||
else | |||
return; | |||
Logger.log.Debug($"Anchor min now at {rt.anchorMin}"); | |||
} | |||
else if(Input.GetKey(KeyCode.X)) | |||
{ // adjust anchorMax | |||
var cpos = rt.anchorMax; | |||
if (Input.GetKey(KeyCode.LeftArrow)) | |||
{ | |||
rt.anchorMax = new Vector2(cpos.x - .001f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.RightArrow)) | |||
{ | |||
rt.anchorMax = new Vector2(cpos.x + .001f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.UpArrow)) | |||
{ | |||
rt.anchorMax = new Vector2(cpos.x, cpos.y + .001f); | |||
} | |||
else if (Input.GetKey(KeyCode.DownArrow)) | |||
{ | |||
rt.anchorMax = new Vector2(cpos.x, cpos.y - .001f); | |||
} | |||
else | |||
return; | |||
Logger.log.Debug($"Anchor max now at {rt.anchorMax}"); | |||
} | |||
else | |||
{ | |||
var cpos = rt.anchoredPosition; | |||
if (Input.GetKey(KeyCode.LeftArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x - .1f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.RightArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x + .1f, cpos.y); | |||
} | |||
else if (Input.GetKey(KeyCode.UpArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x, cpos.y + .1f); | |||
} | |||
else if (Input.GetKey(KeyCode.DownArrow)) | |||
{ | |||
rt.anchoredPosition = new Vector2(cpos.x, cpos.y - .1f); | |||
} | |||
else | |||
return; | |||
Logger.log.Debug($"Position now at {rt.anchoredPosition}"); | |||
} | |||
#endif | |||
} | |||
#endif | |||
} | |||
} |
@ -1,104 +0,0 @@ | |||
using System; | |||
using System.Linq; | |||
using System.Collections.Generic; | |||
using CustomUI.BeatSaber; | |||
using CustomUI.Utilities; | |||
using HMUI; | |||
using IPA.Loader; | |||
using IPA.Old; | |||
using UnityEngine; | |||
using VRUI; | |||
using IPA.Loader.Features; | |||
using TMPro; | |||
using BSIPA_ModList.UI.ViewControllers; | |||
using UnityEngine.UI; | |||
namespace BSIPA_ModList.UI | |||
{ | |||
internal class ModListController : CustomListViewController | |||
{ | |||
public override TableCell CellForIdx(TableView view, int idx) | |||
{ | |||
var cell = base.CellForIdx(view, idx) as LevelListTableCell; | |||
var nameText = cell.GetPrivateField<TextMeshProUGUI>("_songNameText"); | |||
nameText.overflowMode = TextOverflowModes.Overflow; | |||
var authorText = cell.GetPrivateField<TextMeshProUGUI>("_authorText"); | |||
authorText.overflowMode = TextOverflowModes.Overflow; | |||
return cell; | |||
} | |||
internal ModListFlowCoordinator flow; | |||
#pragma warning disable CS0618 | |||
public void Init(ModListFlowCoordinator flow, IEnumerable<PluginLoader.PluginMetadata> bsipaPlugins, IEnumerable<PluginLoader.PluginMetadata> ignoredPlugins, IEnumerable<IPlugin> ipaPlugins) | |||
{ | |||
Data.Clear(); | |||
Logger.log.Debug("List Controller Init"); | |||
DidActivateEvent = DidActivate; | |||
DidSelectRowEvent = DidSelectRow; | |||
rectTransform.anchorMin = new Vector2(0f, 0f); | |||
rectTransform.anchorMax = new Vector2(.4f, 1f); | |||
includePageButtons = true; | |||
this.flow = flow; | |||
reuseIdentifier = "BSIPAModListTableCell"; | |||
foreach (var plugin in bsipaPlugins.Where(p => !p.IsBare)) | |||
Data.Add(new BSIPAModCell(this, plugin)); | |||
foreach (var plugin in ignoredPlugins) | |||
Data.Add(new BSIPAIgnoredModCell(this, plugin)); | |||
foreach (var plugin in bsipaPlugins.Where(p => p.IsBare)) | |||
Data.Add(new LibraryModCell(this, plugin)); | |||
foreach (var plugin in ipaPlugins) | |||
Data.Add(new IPAModCell(this, plugin)); | |||
} | |||
#pragma warning restore | |||
public void Reload() | |||
{ | |||
var cells = _customListTableView.GetPrivateField<List<TableCell>>("_visibleCells"); | |||
foreach (var c in cells) | |||
{ | |||
if (c == null) continue; | |||
c.gameObject?.SetActive(false); | |||
_customListTableView.AddCellToReusableCells(c); | |||
} | |||
cells.Clear(); | |||
_customListTableView.RefreshCells(true); | |||
} | |||
private void DidSelectRow(TableView view, int index) | |||
{ | |||
Debug.Assert(ReferenceEquals(view.dataSource, this)); | |||
(Data[index] as IClickableCell)?.OnSelect(this); | |||
} | |||
private new void DidActivate(bool first, ActivationType type) | |||
{ | |||
var rt = _customListTableView.transform as RectTransform; | |||
rt.anchorMin = new Vector2(0f, 0f); | |||
rt.anchorMax = new Vector2(.9f, 1f); | |||
_customListTableView.gameObject.GetComponent<ScrollRect>().scrollSensitivity = 0f; | |||
var content = _customListTableView.contentTransform; | |||
content.anchoredPosition = new Vector2(7f, 0f); | |||
} | |||
protected override void OnDestroy() | |||
{ | |||
base.OnDestroy(); | |||
foreach (var cell in Data) | |||
{ | |||
if (cell is IDisposable disp) | |||
disp.Dispose(); | |||
} | |||
} | |||
} | |||
} |
@ -1,53 +0,0 @@ | |||
using CustomUI.Settings; | |||
using IPA.Config; | |||
using VRUI; | |||
namespace BSIPA_ModList.UI | |||
{ | |||
internal static class SettingsViewController | |||
{ | |||
private static SubMenu menu; | |||
private static BoolViewController autoUpdate; | |||
private static BoolViewController autoCheck; | |||
private static BoolViewController showEnableDisable; | |||
public static VRUIViewController Create() | |||
{ | |||
menu = SettingsUI.CreateSubMenu("ModListSettings", false); | |||
autoCheck = menu.AddBool("Auto Update Check", "If enabled, automatically checks for updates on game start."); | |||
autoUpdate = menu.AddBool("Auto Update", "If enabled, automatically installs updates after checking for them."); | |||
showEnableDisable = menu.AddBool("Show Enable/Disable Button", "If enabled, BSIPA mods will have a button to enable or disable them."); | |||
autoCheck.applyImmediately = true; | |||
autoCheck.GetValue += () => IPA.Config.SelfConfig.Instance.Value.Updates.AutoCheckUpdates; | |||
autoCheck.SetValue += val => | |||
{ | |||
IPA.Config.SelfConfig.Instance.Value.Updates.AutoCheckUpdates = val; | |||
IPA.Config.SelfConfig.LoaderConfig.Store(IPA.Config.SelfConfig.Instance.Value); | |||
}; | |||
autoUpdate.applyImmediately = true; | |||
autoUpdate.GetValue += () => IPA.Config.SelfConfig.Instance.Value.Updates.AutoUpdate; | |||
autoUpdate.SetValue += val => | |||
{ | |||
IPA.Config.SelfConfig.Instance.Value.Updates.AutoUpdate = val; | |||
IPA.Config.SelfConfig.LoaderConfig.Store(IPA.Config.SelfConfig.Instance.Value); | |||
}; | |||
showEnableDisable.applyImmediately = true; | |||
showEnableDisable.GetValue += () => Plugin.config.Value.ShowEnableDisable; | |||
showEnableDisable.SetValue += val => | |||
{ | |||
Plugin.config.Value.ShowEnableDisable = val; | |||
Plugin.provider.Store(Plugin.config.Value); | |||
}; | |||
autoCheck.Init(); | |||
autoUpdate.Init(); | |||
showEnableDisable.Init(); | |||
return menu.viewController; | |||
} | |||
} | |||
} |
@ -1,163 +0,0 @@ | |||
using IPA.Loader; | |||
using IPA.Utilities; | |||
using System; | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using UnityEngine; | |||
using UnityEngine.SceneManagement; | |||
namespace BSIPA_ModList.UI | |||
{ | |||
internal struct WarningEntry | |||
{ | |||
public string ModName; | |||
public string[] MissingDependencies; | |||
public string[] IgnoredDependencies; | |||
public string[] DisabledDependencies; | |||
public WarningEntry(string modName, string[] missingDependencies, string[] ignoredDependencies, string[] disabledDependencies) | |||
{ | |||
ModName = modName; | |||
MissingDependencies = missingDependencies; | |||
IgnoredDependencies = ignoredDependencies; | |||
DisabledDependencies = disabledDependencies; | |||
} | |||
} | |||
internal class WarningUI : MonoBehaviour | |||
{ // TODO: rework this to just use disable/ignore reason | |||
internal static WarningUI Instance; | |||
internal static bool firstShow = true; | |||
public void Awake() | |||
{ | |||
DontDestroyOnLoad(gameObject); | |||
SceneManager.activeSceneChanged += this.SceneManager_activeSceneChanged; | |||
} | |||
private void SceneManager_activeSceneChanged(Scene from, Scene to) | |||
{ | |||
if (to.name == "EmptyTransition") | |||
{ | |||
if (Instance != null) | |||
{ | |||
Instance.StopAllCoroutines(); | |||
Destroy(Instance.gameObject); | |||
_mainFlow = null; | |||
} | |||
Instance = null; | |||
} | |||
} | |||
public void Init() | |||
{ | |||
Instance = this; | |||
Logger.log.Debug("Warning UI Awake"); | |||
if (firstShow) | |||
{ | |||
firstShow = false; | |||
StartCoroutine(LookForUnmetDependencies()); | |||
} | |||
} | |||
private static MainFlowCoordinator _mainFlow; | |||
private static SimpleDialogPromptViewController _warningDialog; | |||
private static Queue<WarningEntry> _warningsQueue = new Queue<WarningEntry>(); | |||
private static IEnumerator LookForUnmetDependencies() | |||
{ | |||
Logger.log.Debug("Waiting for MainFlowCoordinator to appear..."); | |||
yield return new WaitWhile(() => FindObjectOfType<MainFlowCoordinator>() == null); | |||
Logger.log.Debug("Looking for unmet dependencies..."); | |||
lock (Instance) | |||
{ | |||
if (_mainFlow == null) | |||
{ | |||
_mainFlow = FindObjectOfType<MainFlowCoordinator>(); | |||
_warningDialog = _mainFlow.GetField<SimpleDialogPromptViewController>("_simpleDialogPromptViewController"); | |||
} | |||
_warningsQueue.Clear(); | |||
var enabledPlugins = PluginManager.AllPlugins.Select(p => p.Metadata).NonNull(x => x.Id).ToDictionary(x => x.Id, y => y.Version); | |||
var ignoredPlugins = PluginLoader.ignoredPlugins.NonNull(x => x.Id).ToDictionary(x => x.Id, y => y.Version); | |||
var disabledPlugins = PluginManager.DisabledPlugins.NonNull(x => x.Id).ToDictionary(x => x.Id, y => y.Version); | |||
// iterate only disabled and ignored, as thats where missing deps can end up | |||
foreach (var meta in PluginManager.DisabledPlugins.Concat(PluginLoader.ignoredPlugins)) | |||
{ | |||
List<string> disabledDependencies = new List<string>(); | |||
List<string> ignoredDependencies = new List<string>(); | |||
List<string> missingDependencies = new List<string>(); | |||
foreach (var dep in meta.Manifest.Dependencies) | |||
{ | |||
#if DEBUG | |||
Logger.log.Debug($"Looking for dependency {dep.Key} with version range {dep.Value.Intersect(new SemVer.Range("*.*.*"))}"); | |||
#endif | |||
if (disabledPlugins.TryGetValue(dep.Key, out var version) && dep.Value.IsSatisfied(version)) | |||
{ | |||
Logger.log.Debug($"Dependency {dep.Key} was found, but disabled."); | |||
disabledDependencies.Add($"{dep.Key} {dep.Value.ToString()}"); | |||
} | |||
else if (ignoredPlugins.TryGetValue(dep.Key, out version) && dep.Value.IsSatisfied(version)) | |||
{ | |||
Logger.log.Debug($"Dependency {dep.Key} was found, but was ignored, likely due to a missing dependency."); | |||
ignoredDependencies.Add($"{dep.Key} {dep.Value.ToString()}"); | |||
} | |||
else if (enabledPlugins.TryGetValue(dep.Key, out version) && dep.Value.IsSatisfied(version)) | |||
{ | |||
// do nothing, this was probably user disabled | |||
} | |||
else | |||
{ | |||
Logger.log.Debug($"{meta.Name} is missing dependency {dep.Key} {dep.Value}"); | |||
missingDependencies.Add($"{dep.Key} {dep.Value.ToString()}"); | |||
} | |||
} | |||
if(disabledDependencies.Count > 0 || ignoredDependencies.Count > 0 || missingDependencies.Count > 0) | |||
_warningsQueue.Enqueue(new WarningEntry(meta.Name, missingDependencies.ToArray(), ignoredDependencies.ToArray(), disabledDependencies.ToArray())); | |||
} | |||
if (_warningsQueue.Count > 0) | |||
{ | |||
yield return new WaitWhile(() => !_mainFlow.isActivated); | |||
ShowWarningDialog(); | |||
} | |||
yield break; | |||
} | |||
} | |||
private static void ShowWarningDialog() | |||
{ | |||
WarningEntry warning = _warningsQueue.Dequeue(); | |||
_warningDialog.Init("Unmet Dependencies", $"Mod <b>{warning.ModName}</b> has unmet dependencies!" + | |||
(warning.MissingDependencies.Length > 0 ? $"\nMissing:\n<color=red>{string.Join("\n", warning.MissingDependencies)}</color>" : "") + | |||
(warning.IgnoredDependencies.Length > 0 ? $"\nIgnored:\n<color=#C2B2B2>{string.Join("\n", warning.IgnoredDependencies)}</color>" : "") + | |||
(warning.DisabledDependencies.Length > 0 ? $"\nDisabled:\n<color=#C2C2C2>{string.Join("\n", warning.DisabledDependencies)}</color>" : "") | |||
, "Okay", WarningDialogDidFinish); | |||
_mainFlow.InvokeMethod("PresentViewController", _warningDialog, null, true); | |||
} | |||
private static void WarningDialogDidFinish(int button) | |||
{ | |||
_mainFlow.InvokeMethod("DismissViewController", _warningDialog, null, (_warningsQueue.Count > 0)); | |||
if (_warningsQueue.Count > 0) | |||
{ | |||
ShowWarningDialog(); | |||
} | |||
} | |||
} | |||
} |
@ -1,167 +0,0 @@ | |||
using CustomUI.Utilities; | |||
using IPA.Loader; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Reflection; | |||
using UnityEngine; | |||
using System.Runtime.CompilerServices; | |||
using IPA.Utilities; | |||
namespace BSIPA_ModList | |||
{ | |||
internal static class Utilities | |||
{ | |||
private static Sprite _defaultBsipaIcon; | |||
public static Sprite DefaultBSIPAIcon | |||
{ | |||
get | |||
{ | |||
if (_defaultBsipaIcon == null) | |||
_defaultBsipaIcon = UIUtilities.LoadSpriteFromResources("BSIPA_ModList.Icons.mod_bsipa.png"); | |||
return _defaultBsipaIcon; | |||
} | |||
} | |||
private static Sprite _defaultLibraryIcon; | |||
public static Sprite DefaultLibraryIcon | |||
{ | |||
get | |||
{ | |||
if (_defaultLibraryIcon == null) | |||
_defaultLibraryIcon = UIUtilities.LoadSpriteFromResources("BSIPA_ModList.Icons.library.png"); | |||
return _defaultLibraryIcon; | |||
} | |||
} | |||
private static Sprite _defaultIpaIcon; | |||
public static Sprite DefaultIPAIcon | |||
{ | |||
get | |||
{ | |||
if (_defaultIpaIcon == null) | |||
_defaultIpaIcon = UIUtilities.LoadSpriteFromResources("BSIPA_ModList.Icons.mod_ipa.png"); | |||
return _defaultIpaIcon; | |||
} | |||
} | |||
public static Sprite GetIcon(this PluginLoader.PluginMetadata meta) | |||
{ | |||
if (meta == null) return DefaultBSIPAIcon; | |||
if (meta.IsBare) return DefaultLibraryIcon; | |||
else return GetEmbeddedIcon(meta) ?? DefaultBSIPAIcon; | |||
} | |||
private static Dictionary<PluginLoader.PluginMetadata, Sprite> embeddedIcons = new Dictionary<PluginLoader.PluginMetadata, Sprite>(); | |||
public static Sprite GetEmbeddedIcon(this PluginLoader.PluginMetadata meta) | |||
{ | |||
if (embeddedIcons.TryGetValue(meta, out var sprite)) return sprite; | |||
var icon = GetEmbeddedIconNoCache(meta); | |||
embeddedIcons.Add(meta, icon); | |||
return icon; | |||
} | |||
private static Sprite GetEmbeddedIconNoCache(PluginLoader.PluginMetadata meta) | |||
{ | |||
if (meta.Assembly == null) return null; | |||
if (meta.Manifest.IconPath == null) return null; | |||
try | |||
{ | |||
return UIUtilities.LoadSpriteRaw(UIUtilities.GetResource(meta.Assembly, meta.Manifest.IconPath)); | |||
} | |||
catch (Exception e) | |||
{ | |||
Logger.log.Error($"Error loading icon for {meta.Name}"); | |||
Logger.log.Error(e); | |||
return null; | |||
} | |||
} | |||
public static void DebugPrintTo<T>(this T obj, Action<string> log, int maxDepth = -1) => | |||
DebugPrintTo(obj?.GetType() ?? typeof(T), obj, log, "", new ConditionalWeakTable<object, Ref<bool>>(), maxDepth); | |||
private static void DebugPrintTo(Type type, object obj, Action<string> log, string indent, ConditionalWeakTable<object, Ref<bool>> table, int maxDepth) | |||
{ | |||
if (maxDepth == 0) | |||
{ | |||
log(indent + "<Max depth reached>"); | |||
return; | |||
} | |||
if (obj == null) | |||
{ | |||
log(indent + "null"); | |||
return; | |||
} | |||
table.Add(obj, true); | |||
if (type.IsPrimitive) | |||
{ | |||
log(indent + obj.ToString()); | |||
return; | |||
} | |||
if (type.IsEnum) | |||
{ | |||
log(indent + obj.ToString()); | |||
return; | |||
} | |||
if (type == typeof(string)) | |||
{ | |||
log(indent + $"\"{obj.ToString()}\""); | |||
return; | |||
} | |||
if (type.IsArray) | |||
{ | |||
log(indent + $"{type.GetElementType()} ["); | |||
foreach (var o in obj as Array) | |||
{ | |||
if (type.GetElementType().IsPrimitive) | |||
log(indent + "- " + o?.ToString() ?? "null"); | |||
else if (type.GetElementType().IsEnum) | |||
log(indent + "- " + o?.ToString() ?? "null"); | |||
else if (type.GetElementType() == typeof(string)) | |||
log(indent + "- " + $"\"{o?.ToString()}\""); | |||
else | |||
{ | |||
log(indent + $"- {o?.GetType()?.ToString() ?? "null"}"); | |||
if (o != null) | |||
{ | |||
if (!table.TryGetValue(o, out _)) | |||
DebugPrintTo(o.GetType(), o, log, indent + " ", table, maxDepth - 1); | |||
else | |||
log(indent + " <Already printed>"); | |||
} | |||
} | |||
} | |||
log(indent + "]"); | |||
return; | |||
} | |||
var fields = type.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); | |||
foreach (var field in fields) | |||
{ | |||
var value = field.GetValue(obj); | |||
if (field.FieldType.IsPrimitive) | |||
log(indent + field.Name + ": " + value?.ToString() ?? "null"); | |||
else if (field.FieldType.IsEnum) | |||
log(indent + field.Name + ": " + value?.ToString() ?? "null"); | |||
else if (field.FieldType == typeof(string)) | |||
log(indent + field.Name + ": " + $"\"{value?.ToString()}\""); | |||
else | |||
{ | |||
log(indent + field.Name + ": " + value?.GetType()?.ToString() ?? "null"); | |||
if (value != null) | |||
{ | |||
if (!table.TryGetValue(value, out _)) | |||
DebugPrintTo(value?.GetType() ?? field.FieldType, value, log, indent + " ", table, maxDepth - 1); | |||
else | |||
log(indent + " <Already printed>"); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} |
@ -1,26 +0,0 @@ | |||
{ | |||
"$schema": "https://raw.githubusercontent.com/beat-saber-modding-group/BSIPA-MetadataFileSchema/master/Schema.json", | |||
"author": "DaNike", | |||
"description": [ | |||
"#![BSIPA_ModList.README.md]", | |||
"Mod List", | |||
"========", | |||
"", | |||
"## An in-game interface client for BSIPA." | |||
], | |||
"gameVersion": "1.3.0", | |||
"id": "BSIPA Mod List", | |||
"name": "BSIPA Mod List", | |||
"version": "1.3.2", | |||
"icon": "BSIPA_ModList.Icons.self.png", | |||
"dependsOn": { | |||
"BSIPA": ">=4.0.0-beta.1 <4.1.0", | |||
"CustomUI": "^1.5.4" | |||
}, | |||
"features": [], | |||
"links": { | |||
"project-home": "https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/tree/master/BSIPA-ModList", | |||
"project-source": "https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded", | |||
"donate": "https://ko-fi.com/danike" | |||
} | |||
} |
@ -1,695 +0,0 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |||
<PropertyGroup> | |||
<LangVersion>latest</LangVersion> | |||
</PropertyGroup> | |||
<PropertyGroup> | |||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |||
<ProductVersion>10.0.20506</ProductVersion> | |||
<SchemaVersion>2.0</SchemaVersion> | |||
<RootNamespace></RootNamespace> | |||
<ProjectGuid>{7DDD3563-F4A1-02A1-0E20-80A847EE0B66}</ProjectGuid> | |||
<OutputType>Library</OutputType> | |||
<AppDesignerFolder>Properties</AppDesignerFolder> | |||
<AssemblyName>Assembly-CSharp-Editor</AssemblyName> | |||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion> | |||
<FileAlignment>512</FileAlignment> | |||
<BaseDirectory>.</BaseDirectory> | |||
</PropertyGroup> | |||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |||
<DebugSymbols>true</DebugSymbols> | |||
<DebugType>full</DebugType> | |||
<Optimize>false</Optimize> | |||
<OutputPath>Temp\bin\Debug\</OutputPath> | |||
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_3_14;UNITY_2018_3;UNITY_2018;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_TEXTURE_STREAMING;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_VIDEO;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_EVENT_QUEUE;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_4_6;ENABLE_PROFILER;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_VSTU;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER</DefineConstants> | |||
<ErrorReport>prompt</ErrorReport> | |||
<WarningLevel>4</WarningLevel> | |||
<NoWarn>0169;CS0649;IDE0051</NoWarn> | |||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> | |||
</PropertyGroup> | |||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |||
<DebugType>pdbonly</DebugType> | |||
<Optimize>true</Optimize> | |||
<OutputPath>Temp\bin\Release\</OutputPath> | |||
<ErrorReport>prompt</ErrorReport> | |||
<WarningLevel>4</WarningLevel> | |||
<NoWarn>0169;CS0649;IDE0051</NoWarn> | |||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> | |||
</PropertyGroup> | |||
<PropertyGroup> | |||
<NoConfig>true</NoConfig> | |||
<NoStdLib>true</NoStdLib> | |||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences> | |||
<ImplicitlyExpandNETStandardFacades>false</ImplicitlyExpandNETStandardFacades> | |||
<ImplicitlyExpandDesignTimeFacades>false</ImplicitlyExpandDesignTimeFacades> | |||
</PropertyGroup> | |||
<PropertyGroup> | |||
<ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | |||
<UnityProjectGenerator>Unity/VSTU</UnityProjectGenerator> | |||
<UnityProjectType>Editor:5</UnityProjectType> | |||
<UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget> | |||
<UnityVersion>2018.3.14f1</UnityVersion> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<Reference Include="UnityEngine"> | |||
<HintPath>C:\Program Files\Unity\Hub\Editor\2018.3.14f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor"> | |||
<HintPath>C:\Program Files\Unity\Hub\Editor\2018.3.14f1\Editor\Data\Managed/UnityEditor.dll</HintPath> | |||
</Reference> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Compile Include="Assets\Editor\AssetBundle.cs" /> | |||
<Reference Include="Unity.TextMeshPro.Editor"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Unity.PackageManagerUI.Editor"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Unity.CollabProxy.Editor"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Unity.TextMeshPro"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/ScriptAssemblies/Unity.TextMeshPro.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Unity.Analytics.DataPrivacy"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/ScriptAssemblies/Unity.Analytics.DataPrivacy.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.AIModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.ARModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.AccessibilityModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.AnimationModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.AssetBundleModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.AudioModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.BaselibModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.BaselibModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.ClothModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.ClusterInputModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.ClusterRendererModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.CoreModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.CrashReportingModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.DirectorModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.FileSystemHttpModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.FileSystemHttpModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.GameCenterModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.GridModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.HotReloadModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.IMGUIModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.ImageConversionModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.InputModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.JSONSerializeModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.LocalizationModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.ParticleSystemModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.PerformanceReportingModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.PhysicsModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.Physics2DModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.ProfilerModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.ScreenCaptureModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.SharedInternalsModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.SpatialTrackingModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpatialTrackingModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.SpriteMaskModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.SpriteShapeModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.StreamingModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.StyleSheetsModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.SubstanceModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.TLSModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.TerrainModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.TerrainPhysicsModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.TextCoreModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.TextRenderingModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.TilemapModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.TimelineModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.TimelineModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UIModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UIElementsModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UNETModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UmbraModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UnityAnalyticsModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UnityConnectModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UnityTestProtocolModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UnityWebRequestModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UnityWebRequestAssetBundleModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UnityWebRequestAudioModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UnityWebRequestTextureModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UnityWebRequestWWWModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.VFXModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.VRModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.VehiclesModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.VideoModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.WindModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.XRModule"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Unity.Locator"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/Unity.Locator.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.UI"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.UI"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.TestRunner"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/TestRunner/Editor/UnityEditor.TestRunner.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.TestRunner"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/TestRunner/UnityEngine.TestRunner.dll</HintPath> | |||
</Reference> | |||
<Reference Include="nunit.framework"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/TestRunner/net35/unity-custom/nunit.framework.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.Timeline"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.Timeline"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.Networking"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.Networking"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.GoogleAudioSpatializer"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/Editor/UnityEditor.GoogleAudioSpatializer.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.GoogleAudioSpatializer"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.SpatialTracking"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEngine.SpatialTracking"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/RuntimeEditor/UnityEngine.SpatialTracking.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.VR"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.Graphs"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/Managed/UnityEditor.Graphs.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.LinuxStandalone.Extensions"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/PlaybackEngines/LinuxStandaloneSupport/UnityEditor.LinuxStandalone.Extensions.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.WindowsStandalone.Extensions"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll</HintPath> | |||
</Reference> | |||
<Reference Include="SyntaxTree.VisualStudio.Unity.Bridge"> | |||
<HintPath>C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/16.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.Advertisements"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/PackageCache/[email protected]/Editor/UnityEditor.Advertisements.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Unity.Analytics.Editor"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/PackageCache/[email protected]/Unity.Analytics.Editor.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Unity.Analytics.StandardEvents"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/PackageCache/[email protected]/Unity.Analytics.StandardEvents.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Unity.Analytics.Tracker"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/PackageCache/[email protected]/Unity.Analytics.Tracker.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityEditor.Purchasing"> | |||
<HintPath>Z:/Users/aaron/Documents/BS TMP Exporter/Library/PackageCache/[email protected]/Editor/UnityEditor.Purchasing.dll</HintPath> | |||
</Reference> | |||
<Reference Include="mscorlib"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Core"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Core.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.Serialization"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Runtime.Serialization.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Xml"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Xml.Linq"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.Linq.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Numerics"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Numerics.Vectors"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.Vectors.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.Http"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Net.Http.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Microsoft.CSharp"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Microsoft.CSharp.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Data"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Data.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Microsoft.Win32.Primitives"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/Microsoft.Win32.Primitives.dll</HintPath> | |||
</Reference> | |||
<Reference Include="netstandard"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/netstandard.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.AppContext"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.AppContext.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Collections.Concurrent"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Concurrent.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Collections"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Collections.NonGeneric"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.NonGeneric.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Collections.Specialized"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Specialized.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ComponentModel.Annotations"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ComponentModel"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ComponentModel.EventBasedAsync"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.EventBasedAsync.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ComponentModel.Primitives"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Primitives.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ComponentModel.TypeConverter"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.TypeConverter.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Console"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Console.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Data.Common"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Data.Common.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Diagnostics.Contracts"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Contracts.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Diagnostics.Debug"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Debug.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Diagnostics.FileVersionInfo"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.FileVersionInfo.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Diagnostics.Process"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Process.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Diagnostics.StackTrace"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.StackTrace.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Diagnostics.TextWriterTraceListener"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TextWriterTraceListener.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Diagnostics.Tools"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Tools.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Diagnostics.TraceSource"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TraceSource.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Drawing.Primitives"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Drawing.Primitives.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Dynamic.Runtime"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Dynamic.Runtime.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Globalization.Calendars"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Calendars.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Globalization"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Globalization.Extensions"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Extensions.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO.Compression.ZipFile"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Compression.ZipFile.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO.FileSystem"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO.FileSystem.DriveInfo"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.DriveInfo.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO.FileSystem.Primitives"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Primitives.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO.FileSystem.Watcher"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Watcher.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO.IsolatedStorage"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.IsolatedStorage.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO.MemoryMappedFiles"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.MemoryMappedFiles.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO.Pipes"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Pipes.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.IO.UnmanagedMemoryStream"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.UnmanagedMemoryStream.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Linq"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Linq.Expressions"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Expressions.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Linq.Parallel"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Parallel.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Linq.Queryable"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Queryable.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.Http.Rtc"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Http.Rtc.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.NameResolution"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NameResolution.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.NetworkInformation"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NetworkInformation.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.Ping"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Ping.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.Primitives"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Primitives.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.Requests"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Requests.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.Security"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Security.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.Sockets"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Sockets.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.WebHeaderCollection"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebHeaderCollection.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.WebSockets.Client"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.Client.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Net.WebSockets"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ObjectModel"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ObjectModel.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Reflection"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Reflection.Emit"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Reflection.Emit.ILGeneration"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.ILGeneration.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Reflection.Emit.Lightweight"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.Lightweight.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Reflection.Extensions"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Extensions.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Reflection.Primitives"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Primitives.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Resources.Reader"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Reader.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Resources.ResourceManager"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.ResourceManager.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Resources.Writer"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Writer.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.CompilerServices.VisualC"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.CompilerServices.VisualC.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.Extensions"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Extensions.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.Handles"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Handles.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.InteropServices"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.RuntimeInformation.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.InteropServices.WindowsRuntime"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.Numerics"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Numerics.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.Serialization.Formatters"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Formatters.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.Serialization.Json"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Json.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.Serialization.Primitives"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Primitives.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Runtime.Serialization.Xml"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Xml.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Security.Claims"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Claims.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Security.Cryptography.Algorithms"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Algorithms.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Security.Cryptography.Csp"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Csp.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Security.Cryptography.Encoding"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Encoding.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Security.Cryptography.Primitives"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Primitives.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Security.Cryptography.X509Certificates"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.X509Certificates.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Security.Principal"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Principal.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Security.SecureString"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.SecureString.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ServiceModel.Duplex"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Duplex.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ServiceModel.Http"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Http.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ServiceModel.NetTcp"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.NetTcp.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ServiceModel.Primitives"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Primitives.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ServiceModel.Security"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Security.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Text.Encoding"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Text.Encoding.Extensions"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.Extensions.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Text.RegularExpressions"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.RegularExpressions.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Threading"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Threading.Overlapped"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Overlapped.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Threading.Tasks"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Threading.Tasks.Parallel"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.Parallel.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Threading.Thread"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Thread.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Threading.ThreadPool"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.ThreadPool.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Threading.Timer"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Timer.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.ValueTuple"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ValueTuple.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Xml.ReaderWriter"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.ReaderWriter.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Xml.XDocument"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XDocument.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Xml.XmlDocument"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlDocument.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Xml.XmlSerializer"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlSerializer.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Xml.XPath"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.dll</HintPath> | |||
</Reference> | |||
<Reference Include="System.Xml.XPath.XDocument"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityScript"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.dll</HintPath> | |||
</Reference> | |||
<Reference Include="UnityScript.Lang"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.Lang.dll</HintPath> | |||
</Reference> | |||
<Reference Include="Boo.Lang"> | |||
<HintPath>C:/Program Files/Unity/Hub/Editor/2018.3.14f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll</HintPath> | |||
</Reference> | |||
</ItemGroup> | |||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
<Target Name="GenerateTargetFrameworkMonikerAttribute" /> | |||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||
Other similar extension points exist, see Microsoft.Common.targets. | |||
<Target Name="BeforeBuild"> | |||
</Target> | |||
<Target Name="AfterBuild"> | |||
</Target> | |||
--> | |||
</Project> |
@ -1,7 +0,0 @@ | |||
ManifestFileVersion: 0 | |||
CRC: 4081701901 | |||
AssetBundleManifest: | |||
AssetBundleInfos: | |||
Info_0: | |||
Name: fonts/consolas.font | |||
Dependencies: {} |
@ -1,27 +0,0 @@ | |||
ManifestFileVersion: 0 | |||
CRC: 3061800715 | |||
Hashes: | |||
AssetFileHash: | |||
serializedVersion: 2 | |||
Hash: 9338840e17dd65048cbc1285f77a1f38 | |||
TypeTreeHash: | |||
serializedVersion: 2 | |||
Hash: d0b2f0e67a49883fd83625973d09fe14 | |||
HashAppended: 0 | |||
ClassTypes: | |||
- Class: 21 | |||
Script: {instanceID: 0} | |||
- Class: 28 | |||
Script: {instanceID: 0} | |||
- Class: 48 | |||
Script: {instanceID: 0} | |||
- Class: 114 | |||
Script: {fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04, type: 3} | |||
- Class: 115 | |||
Script: {instanceID: 0} | |||
Assets: | |||
- Assets/Consolas/CONSOLAS_BOLD.asset | |||
- Assets/Consolas/CONSOLAS.asset | |||
- Assets/Consolas/CONSOLAS_ITALIC.asset | |||
- Assets/Consolas/CONSOLAS_BOLD_ITALIC.asset | |||
Dependencies: [] |
@ -1,16 +0,0 @@ | |||
using UnityEditor; | |||
using System.IO; | |||
public class CreateAssetBundles | |||
{ | |||
[MenuItem("Assets/Build AssetBundles")] | |||
static void BuildAllAssetBundles() | |||
{ | |||
string assetBundleDirectory = "Assets/AssetBundles"; | |||
if (!Directory.Exists(assetBundleDirectory)) | |||
{ | |||
Directory.CreateDirectory(assetBundleDirectory); | |||
} | |||
BuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.None, BuildTarget.StandaloneWindows); | |||
} | |||
} |
@ -1,259 +0,0 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!29 &1 | |||
OcclusionCullingSettings: | |||
m_ObjectHideFlags: 0 | |||
serializedVersion: 2 | |||
m_OcclusionBakeSettings: | |||
smallestOccluder: 5 | |||
smallestHole: 0.25 | |||
backfaceThreshold: 100 | |||
m_SceneGUID: 00000000000000000000000000000000 | |||
m_OcclusionCullingData: {fileID: 0} | |||
--- !u!104 &2 | |||
RenderSettings: | |||
m_ObjectHideFlags: 0 | |||
serializedVersion: 9 | |||
m_Fog: 0 | |||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} | |||
m_FogMode: 3 | |||
m_FogDensity: 0.01 | |||
m_LinearFogStart: 0 | |||
m_LinearFogEnd: 300 | |||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} | |||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} | |||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} | |||
m_AmbientIntensity: 1 | |||
m_AmbientMode: 0 | |||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} | |||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} | |||
m_HaloStrength: 0.5 | |||
m_FlareStrength: 1 | |||
m_FlareFadeSpeed: 3 | |||
m_HaloTexture: {fileID: 0} | |||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} | |||
m_DefaultReflectionMode: 0 | |||
m_DefaultReflectionResolution: 128 | |||
m_ReflectionBounces: 1 | |||
m_ReflectionIntensity: 1 | |||
m_CustomReflection: {fileID: 0} | |||
m_Sun: {fileID: 170076734} | |||
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} | |||
m_UseRadianceAmbientProbe: 0 | |||
--- !u!157 &3 | |||
LightmapSettings: | |||
m_ObjectHideFlags: 0 | |||
serializedVersion: 11 | |||
m_GIWorkflowMode: 0 | |||
m_GISettings: | |||
serializedVersion: 2 | |||
m_BounceScale: 1 | |||
m_IndirectOutputScale: 1 | |||
m_AlbedoBoost: 1 | |||
m_TemporalCoherenceThreshold: 1 | |||
m_EnvironmentLightingMode: 0 | |||
m_EnableBakedLightmaps: 1 | |||
m_EnableRealtimeLightmaps: 0 | |||
m_LightmapEditorSettings: | |||
serializedVersion: 10 | |||
m_Resolution: 2 | |||
m_BakeResolution: 10 | |||
m_AtlasSize: 512 | |||
m_AO: 0 | |||
m_AOMaxDistance: 1 | |||
m_CompAOExponent: 1 | |||
m_CompAOExponentDirect: 0 | |||
m_Padding: 2 | |||
m_LightmapParameters: {fileID: 0} | |||
m_LightmapsBakeMode: 1 | |||
m_TextureCompression: 1 | |||
m_FinalGather: 0 | |||
m_FinalGatherFiltering: 1 | |||
m_FinalGatherRayCount: 256 | |||
m_ReflectionCompression: 2 | |||
m_MixedBakeMode: 2 | |||
m_BakeBackend: 1 | |||
m_PVRSampling: 1 | |||
m_PVRDirectSampleCount: 32 | |||
m_PVRSampleCount: 256 | |||
m_PVRBounces: 2 | |||
m_PVRFilterTypeDirect: 0 | |||
m_PVRFilterTypeIndirect: 0 | |||
m_PVRFilterTypeAO: 0 | |||
m_PVRFilteringMode: 1 | |||
m_PVRCulling: 1 | |||
m_PVRFilteringGaussRadiusDirect: 1 | |||
m_PVRFilteringGaussRadiusIndirect: 5 | |||
m_PVRFilteringGaussRadiusAO: 2 | |||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 | |||
m_PVRFilteringAtrousPositionSigmaIndirect: 2 | |||
m_PVRFilteringAtrousPositionSigmaAO: 1 | |||
m_ShowResolutionOverlay: 1 | |||
m_LightingDataAsset: {fileID: 0} | |||
m_UseShadowmask: 1 | |||
--- !u!196 &4 | |||
NavMeshSettings: | |||
serializedVersion: 2 | |||
m_ObjectHideFlags: 0 | |||
m_BuildSettings: | |||
serializedVersion: 2 | |||
agentTypeID: 0 | |||
agentRadius: 0.5 | |||
agentHeight: 2 | |||
agentSlope: 45 | |||
agentClimb: 0.4 | |||
ledgeDropHeight: 0 | |||
maxJumpAcrossDistance: 0 | |||
minRegionArea: 2 | |||
manualCellSize: 0 | |||
cellSize: 0.16666667 | |||
manualTileSize: 0 | |||
tileSize: 256 | |||
accuratePlacement: 0 | |||
debug: | |||
m_Flags: 0 | |||
m_NavMeshData: {fileID: 0} | |||
--- !u!1 &170076733 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 170076735} | |||
- component: {fileID: 170076734} | |||
m_Layer: 0 | |||
m_Name: Directional Light | |||
m_TagString: Untagged | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!108 &170076734 | |||
Light: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_GameObject: {fileID: 170076733} | |||
m_Enabled: 1 | |||
serializedVersion: 8 | |||
m_Type: 1 | |||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} | |||
m_Intensity: 1 | |||
m_Range: 10 | |||
m_SpotAngle: 30 | |||
m_CookieSize: 10 | |||
m_Shadows: | |||
m_Type: 2 | |||
m_Resolution: -1 | |||
m_CustomResolution: -1 | |||
m_Strength: 1 | |||
m_Bias: 0.05 | |||
m_NormalBias: 0.4 | |||
m_NearPlane: 0.2 | |||
m_Cookie: {fileID: 0} | |||
m_DrawHalo: 0 | |||
m_Flare: {fileID: 0} | |||
m_RenderMode: 0 | |||
m_CullingMask: | |||
serializedVersion: 2 | |||
m_Bits: 4294967295 | |||
m_Lightmapping: 1 | |||
m_LightShadowCasterMode: 0 | |||
m_AreaSize: {x: 1, y: 1} | |||
m_BounceIntensity: 1 | |||
m_ColorTemperature: 6570 | |||
m_UseColorTemperature: 0 | |||
m_ShadowRadius: 0 | |||
m_ShadowAngle: 0 | |||
--- !u!4 &170076735 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_GameObject: {fileID: 170076733} | |||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} | |||
m_LocalPosition: {x: 0, y: 3, z: 0} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 0} | |||
m_RootOrder: 1 | |||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} | |||
--- !u!1 &534669902 | |||
GameObject: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
serializedVersion: 6 | |||
m_Component: | |||
- component: {fileID: 534669905} | |||
- component: {fileID: 534669904} | |||
- component: {fileID: 534669903} | |||
m_Layer: 0 | |||
m_Name: Main Camera | |||
m_TagString: MainCamera | |||
m_Icon: {fileID: 0} | |||
m_NavMeshLayer: 0 | |||
m_StaticEditorFlags: 0 | |||
m_IsActive: 1 | |||
--- !u!81 &534669903 | |||
AudioListener: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_GameObject: {fileID: 534669902} | |||
m_Enabled: 1 | |||
--- !u!20 &534669904 | |||
Camera: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_GameObject: {fileID: 534669902} | |||
m_Enabled: 1 | |||
serializedVersion: 2 | |||
m_ClearFlags: 1 | |||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} | |||
m_projectionMatrixMode: 1 | |||
m_SensorSize: {x: 36, y: 24} | |||
m_LensShift: {x: 0, y: 0} | |||
m_GateFitMode: 2 | |||
m_FocalLength: 50 | |||
m_NormalizedViewPortRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 1 | |||
height: 1 | |||
near clip plane: 0.3 | |||
far clip plane: 1000 | |||
field of view: 60 | |||
orthographic: 0 | |||
orthographic size: 5 | |||
m_Depth: -1 | |||
m_CullingMask: | |||
serializedVersion: 2 | |||
m_Bits: 4294967295 | |||
m_RenderingPath: -1 | |||
m_TargetTexture: {fileID: 0} | |||
m_TargetDisplay: 0 | |||
m_TargetEye: 3 | |||
m_HDR: 1 | |||
m_AllowMSAA: 1 | |||
m_AllowDynamicResolution: 0 | |||
m_ForceIntoRT: 0 | |||
m_OcclusionCulling: 1 | |||
m_StereoConvergence: 10 | |||
m_StereoSeparation: 0.022 | |||
--- !u!4 &534669905 | |||
Transform: | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_GameObject: {fileID: 534669902} | |||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} | |||
m_LocalPosition: {x: 0, y: 1, z: -10} | |||
m_LocalScale: {x: 1, y: 1, z: 1} | |||
m_Children: [] | |||
m_Father: {fileID: 0} | |||
m_RootOrder: 0 | |||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
@ -1,103 +0,0 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!21 &2100000 | |||
Material: | |||
serializedVersion: 6 | |||
m_ObjectHideFlags: 0 | |||
m_PrefabParentObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_Name: LiberationSans SDF - Drop Shadow | |||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} | |||
m_ShaderKeywords: OUTLINE_ON UNDERLAY_ON | |||
m_LightmapFlags: 5 | |||
m_EnableInstancingVariants: 0 | |||
m_DoubleSidedGI: 0 | |||
m_CustomRenderQueue: -1 | |||
stringTagMap: {} | |||
disabledShaderPasses: [] | |||
m_SavedProperties: | |||
serializedVersion: 3 | |||
m_TexEnvs: | |||
- _BumpMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _Cube: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _FaceTex: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _MainTex: | |||
m_Texture: {fileID: 2846298, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _OutlineTex: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
m_Floats: | |||
- _Ambient: 0.5 | |||
- _Bevel: 0.5 | |||
- _BevelClamp: 0 | |||
- _BevelOffset: 0 | |||
- _BevelRoundness: 0 | |||
- _BevelWidth: 0 | |||
- _BumpFace: 0 | |||
- _BumpOutline: 0 | |||
- _ColorMask: 15 | |||
- _Diffuse: 0.5 | |||
- _DiffusePower: 1 | |||
- _FaceDilate: 0.1 | |||
- _FaceUVSpeedX: 0 | |||
- _FaceUVSpeedY: 0 | |||
- _GlowInner: 0.05 | |||
- _GlowOffset: 0 | |||
- _GlowOuter: 0.05 | |||
- _GlowPower: 0.75 | |||
- _GradientScale: 10 | |||
- _LightAngle: 3.1416 | |||
- _MaskSoftnessX: 0 | |||
- _MaskSoftnessY: 0 | |||
- _OutlineSoftness: 0 | |||
- _OutlineUVSpeedX: 0 | |||
- _OutlineUVSpeedY: 0 | |||
- _OutlineWidth: 0.1 | |||
- _PerspectiveFilter: 0.875 | |||
- _Reflectivity: 10 | |||
- _ScaleRatioA: 0.9 | |||
- _ScaleRatioB: 0.73125 | |||
- _ScaleRatioC: 0.64125 | |||
- _ScaleX: 1 | |||
- _ScaleY: 1 | |||
- _ShaderFlags: 0 | |||
- _SpecularPower: 2 | |||
- _Stencil: 0 | |||
- _StencilComp: 8 | |||
- _StencilOp: 0 | |||
- _StencilReadMask: 255 | |||
- _StencilWriteMask: 255 | |||
- _TextureHeight: 1024 | |||
- _TextureWidth: 1024 | |||
- _UnderlayDilate: 0 | |||
- _UnderlayOffsetX: 0.5 | |||
- _UnderlayOffsetY: -0.5 | |||
- _UnderlaySoftness: 0.05 | |||
- _VertexOffsetX: 0 | |||
- _VertexOffsetY: 0 | |||
- _WeightBold: 0.75 | |||
- _WeightNormal: 0 | |||
m_Colors: | |||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} | |||
- _Color: {r: 1, g: 1, b: 1, a: 1} | |||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} | |||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1} | |||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} | |||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} | |||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1} | |||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} | |||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} | |||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1} | |||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} |
@ -1,101 +0,0 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!21 &2100000 | |||
Material: | |||
serializedVersion: 6 | |||
m_ObjectHideFlags: 0 | |||
m_PrefabParentObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_Name: LiberationSans SDF - Outline | |||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} | |||
m_ShaderKeywords: OUTLINE_ON | |||
m_LightmapFlags: 5 | |||
m_EnableInstancingVariants: 0 | |||
m_DoubleSidedGI: 0 | |||
m_CustomRenderQueue: 3000 | |||
stringTagMap: {} | |||
disabledShaderPasses: [] | |||
m_SavedProperties: | |||
serializedVersion: 3 | |||
m_TexEnvs: | |||
- _BumpMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _Cube: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _FaceTex: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _MainTex: | |||
m_Texture: {fileID: 2846298, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _OutlineTex: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
m_Floats: | |||
- _Ambient: 0.5 | |||
- _Bevel: 0.5 | |||
- _BevelClamp: 0 | |||
- _BevelOffset: 0 | |||
- _BevelRoundness: 0 | |||
- _BevelWidth: 0 | |||
- _BumpFace: 0 | |||
- _BumpOutline: 0 | |||
- _ColorMask: 15 | |||
- _Diffuse: 0.5 | |||
- _FaceDilate: 0.1 | |||
- _FaceUVSpeedX: 0 | |||
- _FaceUVSpeedY: 0 | |||
- _GlowInner: 0.05 | |||
- _GlowOffset: 0 | |||
- _GlowOuter: 0.05 | |||
- _GlowPower: 0.75 | |||
- _GradientScale: 10 | |||
- _LightAngle: 3.1416 | |||
- _MaskSoftnessX: 0 | |||
- _MaskSoftnessY: 0 | |||
- _OutlineSoftness: 0 | |||
- _OutlineUVSpeedX: 0 | |||
- _OutlineUVSpeedY: 0 | |||
- _OutlineWidth: 0.1 | |||
- _PerspectiveFilter: 0.875 | |||
- _Reflectivity: 10 | |||
- _ScaleRatioA: 0.9 | |||
- _ScaleRatioB: 0.73125 | |||
- _ScaleRatioC: 0.64125 | |||
- _ScaleX: 1 | |||
- _ScaleY: 1 | |||
- _ShaderFlags: 0 | |||
- _SpecularPower: 2 | |||
- _Stencil: 0 | |||
- _StencilComp: 8 | |||
- _StencilOp: 0 | |||
- _StencilReadMask: 255 | |||
- _StencilWriteMask: 255 | |||
- _TextureHeight: 1024 | |||
- _TextureWidth: 1024 | |||
- _UnderlayDilate: 0 | |||
- _UnderlayOffsetX: 0 | |||
- _UnderlayOffsetY: 0 | |||
- _UnderlaySoftness: 0 | |||
- _VertexOffsetX: 0 | |||
- _VertexOffsetY: 0 | |||
- _WeightBold: 0.75 | |||
- _WeightNormal: 0 | |||
m_Colors: | |||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} | |||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} | |||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1} | |||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} | |||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} | |||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1} | |||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} | |||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} | |||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1} | |||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} |
@ -1 +0,0 @@ | |||
)]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,. |
@ -1 +0,0 @@ | |||
([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇〉》」$⦆¥₩ # |
@ -1,142 +0,0 @@ | |||
Shader "TextMeshPro/Bitmap Custom Atlas" { | |||
Properties { | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_FaceTex ("Font Texture", 2D) = "white" {} | |||
_FaceColor ("Text Color", Color) = (1,1,1,1) | |||
_VertexOffsetX ("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY ("Vertex OffsetY", float) = 0 | |||
_MaskSoftnessX ("Mask SoftnessX", float) = 0 | |||
_MaskSoftnessY ("Mask SoftnessY", float) = 0 | |||
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767) | |||
_Padding ("Padding", float) = 0 | |||
_StencilComp("Stencil Comparison", Float) = 8 | |||
_Stencil("Stencil ID", Float) = 0 | |||
_StencilOp("Stencil Operation", Float) = 0 | |||
_StencilWriteMask("Stencil Write Mask", Float) = 255 | |||
_StencilReadMask("Stencil Read Mask", Float) = 255 | |||
_ColorMask("Color Mask", Float) = 15 | |||
} | |||
SubShader{ | |||
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } | |||
Stencil | |||
{ | |||
Ref[_Stencil] | |||
Comp[_StencilComp] | |||
Pass[_StencilOp] | |||
ReadMask[_StencilReadMask] | |||
WriteMask[_StencilWriteMask] | |||
} | |||
Lighting Off | |||
Cull [_CullMode] | |||
ZTest [unity_GUIZTestMode] | |||
ZWrite Off | |||
Fog { Mode Off } | |||
Blend SrcAlpha OneMinusSrcAlpha | |||
ColorMask[_ColorMask] | |||
Pass { | |||
CGPROGRAM | |||
#pragma vertex vert | |||
#pragma fragment frag | |||
#pragma multi_compile __ UNITY_UI_CLIP_RECT | |||
#pragma multi_compile __ UNITY_UI_ALPHACLIP | |||
#include "UnityCG.cginc" | |||
struct appdata_t { | |||
float4 vertex : POSITION; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
}; | |||
struct v2f { | |||
float4 vertex : SV_POSITION; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
float4 mask : TEXCOORD2; | |||
}; | |||
uniform sampler2D _MainTex; | |||
uniform sampler2D _FaceTex; | |||
uniform float4 _FaceTex_ST; | |||
uniform fixed4 _FaceColor; | |||
uniform float _VertexOffsetX; | |||
uniform float _VertexOffsetY; | |||
uniform float4 _ClipRect; | |||
uniform float _MaskSoftnessX; | |||
uniform float _MaskSoftnessY; | |||
float2 UnpackUV(float uv) | |||
{ | |||
float2 output; | |||
output.x = floor(uv / 4096); | |||
output.y = uv - 4096 * output.x; | |||
return output * 0.001953125; | |||
} | |||
v2f vert (appdata_t v) | |||
{ | |||
float4 vert = v.vertex; | |||
vert.x += _VertexOffsetX; | |||
vert.y += _VertexOffsetY; | |||
vert.xy += (vert.w * 0.5) / _ScreenParams.xy; | |||
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); | |||
fixed4 faceColor = v.color; | |||
faceColor *= _FaceColor; | |||
v2f OUT; | |||
OUT.vertex = vPosition; | |||
OUT.color = faceColor; | |||
OUT.texcoord0 = v.texcoord0; | |||
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex); | |||
float2 pixelSize = vPosition.w; | |||
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); | |||
// Clamp _ClipRect to 16bit. | |||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); | |||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); | |||
return OUT; | |||
} | |||
fixed4 frag (v2f IN) : SV_Target | |||
{ | |||
fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color; | |||
// Alternative implementation to UnityGet2DClipping with support for softness. | |||
#if UNITY_UI_CLIP_RECT | |||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); | |||
color *= m.x * m.y; | |||
#endif | |||
#if UNITY_UI_ALPHACLIP | |||
clip(color.a - 0.001); | |||
#endif | |||
return color; | |||
} | |||
ENDCG | |||
} | |||
} | |||
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" | |||
} |
@ -1,144 +0,0 @@ | |||
Shader "TextMeshPro/Mobile/Bitmap" { | |||
Properties { | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_Color ("Text Color", Color) = (1,1,1,1) | |||
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0 | |||
_VertexOffsetX("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY("Vertex OffsetY", float) = 0 | |||
_MaskSoftnessX("Mask SoftnessX", float) = 0 | |||
_MaskSoftnessY("Mask SoftnessY", float) = 0 | |||
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767) | |||
_StencilComp("Stencil Comparison", Float) = 8 | |||
_Stencil("Stencil ID", Float) = 0 | |||
_StencilOp("Stencil Operation", Float) = 0 | |||
_StencilWriteMask("Stencil Write Mask", Float) = 255 | |||
_StencilReadMask("Stencil Read Mask", Float) = 255 | |||
_ColorMask("Color Mask", Float) = 15 | |||
} | |||
SubShader { | |||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } | |||
Stencil | |||
{ | |||
Ref[_Stencil] | |||
Comp[_StencilComp] | |||
Pass[_StencilOp] | |||
ReadMask[_StencilReadMask] | |||
WriteMask[_StencilWriteMask] | |||
} | |||
Lighting Off | |||
Cull Off | |||
ZTest [unity_GUIZTestMode] | |||
ZWrite Off | |||
Fog { Mode Off } | |||
Blend SrcAlpha OneMinusSrcAlpha | |||
ColorMask[_ColorMask] | |||
Pass { | |||
CGPROGRAM | |||
#pragma vertex vert | |||
#pragma fragment frag | |||
#pragma fragmentoption ARB_precision_hint_fastest | |||
#pragma multi_compile __ UNITY_UI_CLIP_RECT | |||
#pragma multi_compile __ UNITY_UI_ALPHACLIP | |||
#include "UnityCG.cginc" | |||
struct appdata_t { | |||
float4 vertex : POSITION; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
}; | |||
struct v2f { | |||
float4 vertex : POSITION; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float4 mask : TEXCOORD2; | |||
}; | |||
sampler2D _MainTex; | |||
fixed4 _Color; | |||
float _DiffusePower; | |||
uniform float _VertexOffsetX; | |||
uniform float _VertexOffsetY; | |||
uniform float4 _ClipRect; | |||
uniform float _MaskSoftnessX; | |||
uniform float _MaskSoftnessY; | |||
v2f vert (appdata_t v) | |||
{ | |||
v2f OUT; | |||
float4 vert = v.vertex; | |||
vert.x += _VertexOffsetX; | |||
vert.y += _VertexOffsetY; | |||
vert.xy += (vert.w * 0.5) / _ScreenParams.xy; | |||
OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert)); | |||
OUT.color = v.color; | |||
OUT.color *= _Color; | |||
OUT.color.rgb *= _DiffusePower; | |||
OUT.texcoord0 = v.texcoord0; | |||
float2 pixelSize = OUT.vertex.w; | |||
//pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); | |||
// Clamp _ClipRect to 16bit. | |||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); | |||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); | |||
return OUT; | |||
} | |||
fixed4 frag (v2f IN) : COLOR | |||
{ | |||
fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a); | |||
// Alternative implementation to UnityGet2DClipping with support for softness. | |||
#if UNITY_UI_CLIP_RECT | |||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); | |||
color *= m.x * m.y; | |||
#endif | |||
#if UNITY_UI_ALPHACLIP | |||
clip(color.a - 0.001); | |||
#endif | |||
return color; | |||
} | |||
ENDCG | |||
} | |||
} | |||
SubShader { | |||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } | |||
Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off } | |||
Blend SrcAlpha OneMinusSrcAlpha | |||
BindChannels { | |||
Bind "Color", color | |||
Bind "Vertex", vertex | |||
Bind "TexCoord", texcoord0 | |||
} | |||
Pass { | |||
SetTexture [_MainTex] { | |||
constantColor [_Color] combine constant * primary, constant * texture | |||
} | |||
} | |||
} | |||
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" | |||
} |
@ -1,142 +0,0 @@ | |||
Shader "TextMeshPro/Bitmap" { | |||
Properties { | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_FaceTex ("Font Texture", 2D) = "white" {} | |||
_FaceColor ("Text Color", Color) = (1,1,1,1) | |||
_VertexOffsetX ("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY ("Vertex OffsetY", float) = 0 | |||
_MaskSoftnessX ("Mask SoftnessX", float) = 0 | |||
_MaskSoftnessY ("Mask SoftnessY", float) = 0 | |||
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767) | |||
_StencilComp("Stencil Comparison", Float) = 8 | |||
_Stencil("Stencil ID", Float) = 0 | |||
_StencilOp("Stencil Operation", Float) = 0 | |||
_StencilWriteMask("Stencil Write Mask", Float) = 255 | |||
_StencilReadMask("Stencil Read Mask", Float) = 255 | |||
_ColorMask("Color Mask", Float) = 15 | |||
} | |||
SubShader{ | |||
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } | |||
Stencil | |||
{ | |||
Ref[_Stencil] | |||
Comp[_StencilComp] | |||
Pass[_StencilOp] | |||
ReadMask[_StencilReadMask] | |||
WriteMask[_StencilWriteMask] | |||
} | |||
Lighting Off | |||
Cull [_CullMode] | |||
ZTest [unity_GUIZTestMode] | |||
ZWrite Off | |||
Fog { Mode Off } | |||
Blend SrcAlpha OneMinusSrcAlpha | |||
ColorMask[_ColorMask] | |||
Pass { | |||
CGPROGRAM | |||
#pragma vertex vert | |||
#pragma fragment frag | |||
#pragma multi_compile __ UNITY_UI_CLIP_RECT | |||
#pragma multi_compile __ UNITY_UI_ALPHACLIP | |||
#include "UnityCG.cginc" | |||
struct appdata_t { | |||
float4 vertex : POSITION; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
}; | |||
struct v2f { | |||
float4 vertex : SV_POSITION; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
float4 mask : TEXCOORD2; | |||
}; | |||
uniform sampler2D _MainTex; | |||
uniform sampler2D _FaceTex; | |||
uniform float4 _FaceTex_ST; | |||
uniform fixed4 _FaceColor; | |||
uniform float _VertexOffsetX; | |||
uniform float _VertexOffsetY; | |||
uniform float4 _ClipRect; | |||
uniform float _MaskSoftnessX; | |||
uniform float _MaskSoftnessY; | |||
float2 UnpackUV(float uv) | |||
{ | |||
float2 output; | |||
output.x = floor(uv / 4096); | |||
output.y = uv - 4096 * output.x; | |||
return output * 0.001953125; | |||
} | |||
v2f vert (appdata_t v) | |||
{ | |||
float4 vert = v.vertex; | |||
vert.x += _VertexOffsetX; | |||
vert.y += _VertexOffsetY; | |||
vert.xy += (vert.w * 0.5) / _ScreenParams.xy; | |||
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); | |||
fixed4 faceColor = v.color; | |||
faceColor *= _FaceColor; | |||
v2f OUT; | |||
OUT.vertex = vPosition; | |||
OUT.color = faceColor; | |||
OUT.texcoord0 = v.texcoord0; | |||
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex); | |||
float2 pixelSize = vPosition.w; | |||
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); | |||
// Clamp _ClipRect to 16bit. | |||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); | |||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); | |||
return OUT; | |||
} | |||
fixed4 frag (v2f IN) : SV_Target | |||
{ | |||
fixed4 color = tex2D(_MainTex, IN.texcoord0); | |||
color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a); | |||
// Alternative implementation to UnityGet2DClipping with support for softness. | |||
#if UNITY_UI_CLIP_RECT | |||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); | |||
color *= m.x * m.y; | |||
#endif | |||
#if UNITY_UI_ALPHACLIP | |||
clip(color.a - 0.001); | |||
#endif | |||
return color; | |||
} | |||
ENDCG | |||
} | |||
} | |||
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" | |||
} |
@ -1,304 +0,0 @@ | |||
Shader "TextMeshPro/Distance Field Overlay" { | |||
Properties { | |||
_FaceTex ("Face Texture", 2D) = "white" {} | |||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 | |||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 | |||
_FaceColor ("Face Color", Color) = (1,1,1,1) | |||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0 | |||
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |||
_OutlineTex ("Outline Texture", 2D) = "white" {} | |||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 | |||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 | |||
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 | |||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0 | |||
_Bevel ("Bevel", Range(0,1)) = 0.5 | |||
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 | |||
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 | |||
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0 | |||
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 | |||
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 | |||
_SpecularColor ("Specular", Color) = (1,1,1,1) | |||
_SpecularPower ("Specular", Range(0,4)) = 2.0 | |||
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 | |||
_Diffuse ("Diffuse", Range(0,1)) = 0.5 | |||
_Ambient ("Ambient", Range(1,0)) = 0.5 | |||
_BumpMap ("Normal map", 2D) = "bump" {} | |||
_BumpOutline ("Bump Outline", Range(0,1)) = 0 | |||
_BumpFace ("Bump Face", Range(0,1)) = 0 | |||
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) | |||
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) | |||
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } | |||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) | |||
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) | |||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 | |||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 | |||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 | |||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0 | |||
_GlowColor ("Color", Color) = (0, 1, 0, 0.5) | |||
_GlowOffset ("Offset", Range(-1,1)) = 0 | |||
_GlowInner ("Inner", Range(0,1)) = 0.05 | |||
_GlowOuter ("Outer", Range(0,1)) = 0.05 | |||
_GlowPower ("Falloff", Range(1, 0)) = 0.75 | |||
_WeightNormal ("Weight Normal", float) = 0 | |||
_WeightBold ("Weight Bold", float) = 0.5 | |||
_ShaderFlags ("Flags", float) = 0 | |||
_ScaleRatioA ("Scale RatioA", float) = 1 | |||
_ScaleRatioB ("Scale RatioB", float) = 1 | |||
_ScaleRatioC ("Scale RatioC", float) = 1 | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_TextureWidth ("Texture Width", float) = 512 | |||
_TextureHeight ("Texture Height", float) = 512 | |||
_GradientScale ("Gradient Scale", float) = 5.0 | |||
_ScaleX ("Scale X", float) = 1.0 | |||
_ScaleY ("Scale Y", float) = 1.0 | |||
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 | |||
_VertexOffsetX ("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY ("Vertex OffsetY", float) = 0 | |||
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) | |||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) | |||
_MaskSoftnessX ("Mask SoftnessX", float) = 0 | |||
_MaskSoftnessY ("Mask SoftnessY", float) = 0 | |||
_StencilComp ("Stencil Comparison", Float) = 8 | |||
_Stencil ("Stencil ID", Float) = 0 | |||
_StencilOp ("Stencil Operation", Float) = 0 | |||
_StencilWriteMask ("Stencil Write Mask", Float) = 255 | |||
_StencilReadMask ("Stencil Read Mask", Float) = 255 | |||
_ColorMask ("Color Mask", Float) = 15 | |||
} | |||
SubShader { | |||
Tags | |||
{ | |||
"Queue"="Overlay" | |||
"IgnoreProjector"="True" | |||
"RenderType"="Transparent" | |||
} | |||
Stencil | |||
{ | |||
Ref [_Stencil] | |||
Comp [_StencilComp] | |||
Pass [_StencilOp] | |||
ReadMask [_StencilReadMask] | |||
WriteMask [_StencilWriteMask] | |||
} | |||
Cull [_CullMode] | |||
ZWrite Off | |||
Lighting Off | |||
Fog { Mode Off } | |||
ZTest Always | |||
Blend One OneMinusSrcAlpha | |||
ColorMask [_ColorMask] | |||
Pass { | |||
CGPROGRAM | |||
#pragma target 3.0 | |||
#pragma vertex VertShader | |||
#pragma fragment PixShader | |||
#pragma shader_feature __ BEVEL_ON | |||
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER | |||
#pragma shader_feature __ GLOW_ON | |||
#pragma multi_compile __ UNITY_UI_CLIP_RECT | |||
#pragma multi_compile __ UNITY_UI_ALPHACLIP | |||
#include "UnityCG.cginc" | |||
#include "UnityUI.cginc" | |||
#include "TMPro_Properties.cginc" | |||
#include "TMPro.cginc" | |||
struct vertex_t { | |||
float4 position : POSITION; | |||
float3 normal : NORMAL; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
}; | |||
struct pixel_t { | |||
float4 position : SV_POSITION; | |||
fixed4 color : COLOR; | |||
float2 atlas : TEXCOORD0; // Atlas | |||
float4 param : TEXCOORD1; // alphaClip, scale, bias, weight | |||
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw) | |||
float3 viewDir : TEXCOORD3; | |||
#if (UNDERLAY_ON || UNDERLAY_INNER) | |||
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias | |||
fixed4 underlayColor : COLOR1; | |||
#endif | |||
float4 textures : TEXCOORD5; | |||
}; | |||
// Used by Unity internally to handle Texture Tiling and Offset. | |||
float4 _FaceTex_ST; | |||
float4 _OutlineTex_ST; | |||
pixel_t VertShader(vertex_t input) | |||
{ | |||
float bold = step(input.texcoord1.y, 0); | |||
float4 vert = input.position; | |||
vert.x += _VertexOffsetX; | |||
vert.y += _VertexOffsetY; | |||
float4 vPosition = UnityObjectToClipPos(vert); | |||
float2 pixelSize = vPosition.w; | |||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); | |||
float scale = rsqrt(dot(pixelSize, pixelSize)); | |||
scale *= abs(input.texcoord1.y) * _GradientScale * 1.5; | |||
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); | |||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; | |||
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; | |||
float bias =(.5 - weight) + (.5 / scale); | |||
float alphaClip = (1.0 - _OutlineWidth*_ScaleRatioA - _OutlineSoftness*_ScaleRatioA); | |||
#if GLOW_ON | |||
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB); | |||
#endif | |||
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight; | |||
#if (UNDERLAY_ON || UNDERLAY_INNER) | |||
float4 underlayColor = _UnderlayColor; | |||
underlayColor.rgb *= underlayColor.a; | |||
float bScale = scale; | |||
bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale); | |||
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale); | |||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; | |||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; | |||
float2 bOffset = float2(x, y); | |||
#endif | |||
// Generate UV for the Masking Texture | |||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); | |||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); | |||
// Support for texture tiling and offset | |||
float2 textureUV = UnpackUV(input.texcoord1.x); | |||
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex); | |||
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex); | |||
pixel_t output = { | |||
vPosition, | |||
input.color, | |||
input.texcoord0, | |||
float4(alphaClip, scale, bias, weight), | |||
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)), | |||
mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz), | |||
#if (UNDERLAY_ON || UNDERLAY_INNER) | |||
float4(input.texcoord0 + bOffset, bScale, bBias), | |||
underlayColor, | |||
#endif | |||
float4(faceUV, outlineUV), | |||
}; | |||
return output; | |||
} | |||
fixed4 PixShader(pixel_t input) : SV_Target | |||
{ | |||
float c = tex2D(_MainTex, input.atlas).a; | |||
#ifndef UNDERLAY_ON | |||
clip(c - input.param.x); | |||
#endif | |||
float scale = input.param.y; | |||
float bias = input.param.z; | |||
float weight = input.param.w; | |||
float sd = (bias - c) * scale; | |||
float outline = (_OutlineWidth * _ScaleRatioA) * scale; | |||
float softness = (_OutlineSoftness * _ScaleRatioA) * scale; | |||
half4 faceColor = _FaceColor; | |||
half4 outlineColor = _OutlineColor; | |||
faceColor.rgb *= input.color.rgb; | |||
faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y); | |||
outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y); | |||
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); | |||
#if BEVEL_ON | |||
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0); | |||
float3 n = GetSurfaceNormal(input.atlas, weight, dxy); | |||
float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz; | |||
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); | |||
n = normalize(n- bump); | |||
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0)); | |||
float3 col = GetSpecular(n, light); | |||
faceColor.rgb += col*faceColor.a; | |||
faceColor.rgb *= 1-(dot(n, light)*_Diffuse); | |||
faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z); | |||
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n)); | |||
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; | |||
#endif | |||
#if UNDERLAY_ON | |||
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; | |||
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a); | |||
#endif | |||
#if UNDERLAY_INNER | |||
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; | |||
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a); | |||
#endif | |||
#if GLOW_ON | |||
float4 glowColor = GetGlowColor(sd, scale); | |||
faceColor.rgb += glowColor.rgb * glowColor.a; | |||
#endif | |||
// Alternative implementation to UnityGet2DClipping with support for softness. | |||
#if UNITY_UI_CLIP_RECT | |||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); | |||
faceColor *= m.x * m.y; | |||
#endif | |||
#if UNITY_UI_ALPHACLIP | |||
clip(faceColor.a - 0.001); | |||
#endif | |||
return faceColor * input.color.a; | |||
} | |||
ENDCG | |||
} | |||
} | |||
Fallback "TextMeshPro/Mobile/Distance Field" | |||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" | |||
} |
@ -1,245 +0,0 @@ | |||
// Simplified SDF shader: | |||
// - No Shading Option (bevel / bump / env map) | |||
// - No Glow Option | |||
// - Softness is applied on both side of the outline | |||
Shader "TextMeshPro/Mobile/Distance Field - Masking" { | |||
Properties { | |||
_FaceColor ("Face Color", Color) = (1,1,1,1) | |||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0 | |||
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0 | |||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0 | |||
_UnderlayColor ("Border Color", Color) = (0,0,0,.5) | |||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 | |||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 | |||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 | |||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0 | |||
_WeightNormal ("Weight Normal", float) = 0 | |||
_WeightBold ("Weight Bold", float) = .5 | |||
_ShaderFlags ("Flags", float) = 0 | |||
_ScaleRatioA ("Scale RatioA", float) = 1 | |||
_ScaleRatioB ("Scale RatioB", float) = 1 | |||
_ScaleRatioC ("Scale RatioC", float) = 1 | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_TextureWidth ("Texture Width", float) = 512 | |||
_TextureHeight ("Texture Height", float) = 512 | |||
_GradientScale ("Gradient Scale", float) = 5 | |||
_ScaleX ("Scale X", float) = 1 | |||
_ScaleY ("Scale Y", float) = 1 | |||
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 | |||
_VertexOffsetX ("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY ("Vertex OffsetY", float) = 0 | |||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) | |||
_MaskSoftnessX ("Mask SoftnessX", float) = 0 | |||
_MaskSoftnessY ("Mask SoftnessY", float) = 0 | |||
_MaskTex ("Mask Texture", 2D) = "white" {} | |||
_MaskInverse ("Inverse", float) = 0 | |||
_MaskEdgeColor ("Edge Color", Color) = (1,1,1,1) | |||
_MaskEdgeSoftness ("Edge Softness", Range(0, 1)) = 0.01 | |||
_MaskWipeControl ("Wipe Position", Range(0, 1)) = 0.5 | |||
_StencilComp ("Stencil Comparison", Float) = 8 | |||
_Stencil ("Stencil ID", Float) = 0 | |||
_StencilOp ("Stencil Operation", Float) = 0 | |||
_StencilWriteMask ("Stencil Write Mask", Float) = 255 | |||
_StencilReadMask ("Stencil Read Mask", Float) = 255 | |||
_ColorMask ("Color Mask", Float) = 15 | |||
} | |||
SubShader { | |||
Tags | |||
{ | |||
"Queue"="Transparent" | |||
"IgnoreProjector"="True" | |||
"RenderType"="Transparent" | |||
} | |||
Stencil | |||
{ | |||
Ref [_Stencil] | |||
Comp [_StencilComp] | |||
Pass [_StencilOp] | |||
ReadMask [_StencilReadMask] | |||
WriteMask [_StencilWriteMask] | |||
} | |||
Cull [_CullMode] | |||
ZWrite Off | |||
Lighting Off | |||
Fog { Mode Off } | |||
ZTest [unity_GUIZTestMode] | |||
Blend One OneMinusSrcAlpha | |||
ColorMask [_ColorMask] | |||
Pass { | |||
CGPROGRAM | |||
#pragma vertex VertShader | |||
#pragma fragment PixShader | |||
#pragma shader_feature __ OUTLINE_ON | |||
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER | |||
#pragma multi_compile __ UNITY_UI_CLIP_RECT | |||
#pragma multi_compile __ UNITY_UI_ALPHACLIP | |||
#include "UnityCG.cginc" | |||
#include "UnityUI.cginc" | |||
#include "TMPro_Properties.cginc" | |||
struct vertex_t { | |||
float4 vertex : POSITION; | |||
float3 normal : NORMAL; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
}; | |||
struct pixel_t { | |||
float4 vertex : SV_POSITION; | |||
fixed4 faceColor : COLOR; | |||
fixed4 outlineColor : COLOR1; | |||
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV | |||
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w) | |||
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw) | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved | |||
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y) | |||
#endif | |||
}; | |||
float _MaskWipeControl; | |||
float _MaskEdgeSoftness; | |||
fixed4 _MaskEdgeColor; | |||
bool _MaskInverse; | |||
pixel_t VertShader(vertex_t input) | |||
{ | |||
float bold = step(input.texcoord1.y, 0); | |||
float4 vert = input.vertex; | |||
vert.x += _VertexOffsetX; | |||
vert.y += _VertexOffsetY; | |||
float4 vPosition = UnityObjectToClipPos(vert); | |||
float2 pixelSize = vPosition.w; | |||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); | |||
float scale = rsqrt(dot(pixelSize, pixelSize)); | |||
scale *= abs(input.texcoord1.y) * _GradientScale * 1.5; | |||
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); | |||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; | |||
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; | |||
float layerScale = scale; | |||
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale); | |||
float bias = (0.5 - weight) * scale - 0.5; | |||
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale; | |||
float opacity = input.color.a; | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
opacity = 1.0; | |||
#endif | |||
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; | |||
faceColor.rgb *= faceColor.a; | |||
fixed4 outlineColor = _OutlineColor; | |||
outlineColor.a *= opacity; | |||
outlineColor.rgb *= outlineColor.a; | |||
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2)))); | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale); | |||
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale); | |||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; | |||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; | |||
float2 layerOffset = float2(x, y); | |||
#endif | |||
// Generate UV for the Masking Texture | |||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); | |||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); | |||
// Structure for pixel shader | |||
pixel_t output = { | |||
vPosition, | |||
faceColor, | |||
outlineColor, | |||
float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y), | |||
half4(scale, bias - outline, bias + outline, bias), | |||
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)), | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
float4(input.texcoord0 + layerOffset, input.color.a, 0), | |||
half2(layerScale, layerBias), | |||
#endif | |||
}; | |||
return output; | |||
} | |||
// PIXEL SHADER | |||
fixed4 PixShader(pixel_t input) : SV_Target | |||
{ | |||
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x; | |||
half4 c = input.faceColor * saturate(d - input.param.w); | |||
#ifdef OUTLINE_ON | |||
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z)); | |||
c *= saturate(d - input.param.y); | |||
#endif | |||
#if UNDERLAY_ON | |||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; | |||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a); | |||
#endif | |||
#if UNDERLAY_INNER | |||
half sd = saturate(d - input.param.z); | |||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; | |||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a); | |||
#endif | |||
// Alternative implementation to UnityGet2DClipping with support for softness. | |||
#if UNITY_UI_CLIP_RECT | |||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); | |||
c *= m.x * m.y; | |||
#endif | |||
float a = abs(_MaskInverse - tex2D(_MaskTex, input.texcoord0.zw).a); | |||
float t = a + (1 - _MaskWipeControl) * _MaskEdgeSoftness - _MaskWipeControl; | |||
a = saturate(t / _MaskEdgeSoftness); | |||
c.rgb = lerp(_MaskEdgeColor.rgb*c.a, c.rgb, a); | |||
c *= a; | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
c *= input.texcoord1.z; | |||
#endif | |||
#if UNITY_UI_ALPHACLIP | |||
clip(c.a - 0.001); | |||
#endif | |||
return c; | |||
} | |||
ENDCG | |||
} | |||
} | |||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" | |||
} |
@ -1,229 +0,0 @@ | |||
// Simplified SDF shader: | |||
// - No Shading Option (bevel / bump / env map) | |||
// - No Glow Option | |||
// - Softness is applied on both side of the outline | |||
Shader "TextMeshPro/Mobile/Distance Field Overlay" { | |||
Properties { | |||
_FaceColor ("Face Color", Color) = (1,1,1,1) | |||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0 | |||
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0 | |||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0 | |||
_UnderlayColor ("Border Color", Color) = (0,0,0,.5) | |||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 | |||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 | |||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 | |||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0 | |||
_WeightNormal ("Weight Normal", float) = 0 | |||
_WeightBold ("Weight Bold", float) = .5 | |||
_ShaderFlags ("Flags", float) = 0 | |||
_ScaleRatioA ("Scale RatioA", float) = 1 | |||
_ScaleRatioB ("Scale RatioB", float) = 1 | |||
_ScaleRatioC ("Scale RatioC", float) = 1 | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_TextureWidth ("Texture Width", float) = 512 | |||
_TextureHeight ("Texture Height", float) = 512 | |||
_GradientScale ("Gradient Scale", float) = 5 | |||
_ScaleX ("Scale X", float) = 1 | |||
_ScaleY ("Scale Y", float) = 1 | |||
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 | |||
_VertexOffsetX ("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY ("Vertex OffsetY", float) = 0 | |||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) | |||
_MaskSoftnessX ("Mask SoftnessX", float) = 0 | |||
_MaskSoftnessY ("Mask SoftnessY", float) = 0 | |||
_StencilComp ("Stencil Comparison", Float) = 8 | |||
_Stencil ("Stencil ID", Float) = 0 | |||
_StencilOp ("Stencil Operation", Float) = 0 | |||
_StencilWriteMask ("Stencil Write Mask", Float) = 255 | |||
_StencilReadMask ("Stencil Read Mask", Float) = 255 | |||
_ColorMask ("Color Mask", Float) = 15 | |||
} | |||
SubShader { | |||
Tags | |||
{ | |||
"Queue"="Overlay" | |||
"IgnoreProjector"="True" | |||
"RenderType"="Transparent" | |||
} | |||
Stencil | |||
{ | |||
Ref [_Stencil] | |||
Comp [_StencilComp] | |||
Pass [_StencilOp] | |||
ReadMask [_StencilReadMask] | |||
WriteMask [_StencilWriteMask] | |||
} | |||
Cull [_CullMode] | |||
ZWrite Off | |||
Lighting Off | |||
Fog { Mode Off } | |||
ZTest Always | |||
Blend One OneMinusSrcAlpha | |||
ColorMask [_ColorMask] | |||
Pass { | |||
CGPROGRAM | |||
#pragma vertex VertShader | |||
#pragma fragment PixShader | |||
#pragma shader_feature __ OUTLINE_ON | |||
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER | |||
#pragma multi_compile __ UNITY_UI_CLIP_RECT | |||
#pragma multi_compile __ UNITY_UI_ALPHACLIP | |||
#include "UnityCG.cginc" | |||
#include "UnityUI.cginc" | |||
#include "TMPro_Properties.cginc" | |||
struct vertex_t { | |||
float4 vertex : POSITION; | |||
float3 normal : NORMAL; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
}; | |||
struct pixel_t { | |||
float4 vertex : SV_POSITION; | |||
fixed4 faceColor : COLOR; | |||
fixed4 outlineColor : COLOR1; | |||
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV | |||
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w) | |||
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw) | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved | |||
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y) | |||
#endif | |||
}; | |||
pixel_t VertShader(vertex_t input) | |||
{ | |||
float bold = step(input.texcoord1.y, 0); | |||
float4 vert = input.vertex; | |||
vert.x += _VertexOffsetX; | |||
vert.y += _VertexOffsetY; | |||
float4 vPosition = UnityObjectToClipPos(vert); | |||
float2 pixelSize = vPosition.w; | |||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); | |||
float scale = rsqrt(dot(pixelSize, pixelSize)); | |||
scale *= abs(input.texcoord1.y) * _GradientScale * 1.5; | |||
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); | |||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; | |||
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; | |||
float layerScale = scale; | |||
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale); | |||
float bias = (0.5 - weight) * scale - 0.5; | |||
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale; | |||
float opacity = input.color.a; | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
opacity = 1.0; | |||
#endif | |||
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; | |||
faceColor.rgb *= faceColor.a; | |||
fixed4 outlineColor = _OutlineColor; | |||
outlineColor.a *= opacity; | |||
outlineColor.rgb *= outlineColor.a; | |||
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2)))); | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale); | |||
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale); | |||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; | |||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; | |||
float2 layerOffset = float2(x, y); | |||
#endif | |||
// Generate UV for the Masking Texture | |||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); | |||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); | |||
// Structure for pixel shader | |||
pixel_t output = { | |||
vPosition, | |||
faceColor, | |||
outlineColor, | |||
float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y), | |||
half4(scale, bias - outline, bias + outline, bias), | |||
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)), | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
float4(input.texcoord0 + layerOffset, input.color.a, 0), | |||
half2(layerScale, layerBias), | |||
#endif | |||
}; | |||
return output; | |||
} | |||
// PIXEL SHADER | |||
fixed4 PixShader(pixel_t input) : SV_Target | |||
{ | |||
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x; | |||
half4 c = input.faceColor * saturate(d - input.param.w); | |||
#ifdef OUTLINE_ON | |||
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z)); | |||
c *= saturate(d - input.param.y); | |||
#endif | |||
#if UNDERLAY_ON | |||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; | |||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a); | |||
#endif | |||
#if UNDERLAY_INNER | |||
half sd = saturate(d - input.param.z); | |||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; | |||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a); | |||
#endif | |||
// Alternative implementation to UnityGet2DClipping with support for softness. | |||
#if UNITY_UI_CLIP_RECT | |||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); | |||
c *= m.x * m.y; | |||
#endif | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
c *= input.texcoord1.z; | |||
#endif | |||
#if UNITY_UI_ALPHACLIP | |||
clip(c.a - 0.001); | |||
#endif | |||
return c; | |||
} | |||
ENDCG | |||
} | |||
} | |||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" | |||
} |
@ -1,229 +0,0 @@ | |||
// Simplified SDF shader: | |||
// - No Shading Option (bevel / bump / env map) | |||
// - No Glow Option | |||
// - Softness is applied on both side of the outline | |||
Shader "TextMeshPro/Mobile/Distance Field" { | |||
Properties { | |||
_FaceColor ("Face Color", Color) = (1,1,1,1) | |||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0 | |||
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |||
_OutlineWidth ("Outline Thickness", Range(0,1)) = 0 | |||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0 | |||
_UnderlayColor ("Border Color", Color) = (0,0,0,.5) | |||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 | |||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 | |||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 | |||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0 | |||
_WeightNormal ("Weight Normal", float) = 0 | |||
_WeightBold ("Weight Bold", float) = .5 | |||
_ShaderFlags ("Flags", float) = 0 | |||
_ScaleRatioA ("Scale RatioA", float) = 1 | |||
_ScaleRatioB ("Scale RatioB", float) = 1 | |||
_ScaleRatioC ("Scale RatioC", float) = 1 | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_TextureWidth ("Texture Width", float) = 512 | |||
_TextureHeight ("Texture Height", float) = 512 | |||
_GradientScale ("Gradient Scale", float) = 5 | |||
_ScaleX ("Scale X", float) = 1 | |||
_ScaleY ("Scale Y", float) = 1 | |||
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 | |||
_VertexOffsetX ("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY ("Vertex OffsetY", float) = 0 | |||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) | |||
_MaskSoftnessX ("Mask SoftnessX", float) = 0 | |||
_MaskSoftnessY ("Mask SoftnessY", float) = 0 | |||
_StencilComp ("Stencil Comparison", Float) = 8 | |||
_Stencil ("Stencil ID", Float) = 0 | |||
_StencilOp ("Stencil Operation", Float) = 0 | |||
_StencilWriteMask ("Stencil Write Mask", Float) = 255 | |||
_StencilReadMask ("Stencil Read Mask", Float) = 255 | |||
_ColorMask ("Color Mask", Float) = 15 | |||
} | |||
SubShader { | |||
Tags | |||
{ | |||
"Queue"="Transparent" | |||
"IgnoreProjector"="True" | |||
"RenderType"="Transparent" | |||
} | |||
Stencil | |||
{ | |||
Ref [_Stencil] | |||
Comp [_StencilComp] | |||
Pass [_StencilOp] | |||
ReadMask [_StencilReadMask] | |||
WriteMask [_StencilWriteMask] | |||
} | |||
Cull [_CullMode] | |||
ZWrite Off | |||
Lighting Off | |||
Fog { Mode Off } | |||
ZTest [unity_GUIZTestMode] | |||
Blend One OneMinusSrcAlpha | |||
ColorMask [_ColorMask] | |||
Pass { | |||
CGPROGRAM | |||
#pragma vertex VertShader | |||
#pragma fragment PixShader | |||
#pragma shader_feature __ OUTLINE_ON | |||
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER | |||
#pragma multi_compile __ UNITY_UI_CLIP_RECT | |||
#pragma multi_compile __ UNITY_UI_ALPHACLIP | |||
#include "UnityCG.cginc" | |||
#include "UnityUI.cginc" | |||
#include "TMPro_Properties.cginc" | |||
struct vertex_t { | |||
float4 vertex : POSITION; | |||
float3 normal : NORMAL; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
}; | |||
struct pixel_t { | |||
float4 vertex : SV_POSITION; | |||
fixed4 faceColor : COLOR; | |||
fixed4 outlineColor : COLOR1; | |||
float4 texcoord0 : TEXCOORD0; // Texture UV, Mask UV | |||
half4 param : TEXCOORD1; // Scale(x), BiasIn(y), BiasOut(z), Bias(w) | |||
half4 mask : TEXCOORD2; // Position in clip space(xy), Softness(zw) | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
float4 texcoord1 : TEXCOORD3; // Texture UV, alpha, reserved | |||
half2 underlayParam : TEXCOORD4; // Scale(x), Bias(y) | |||
#endif | |||
}; | |||
pixel_t VertShader(vertex_t input) | |||
{ | |||
float bold = step(input.texcoord1.y, 0); | |||
float4 vert = input.vertex; | |||
vert.x += _VertexOffsetX; | |||
vert.y += _VertexOffsetY; | |||
float4 vPosition = UnityObjectToClipPos(vert); | |||
float2 pixelSize = vPosition.w; | |||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); | |||
float scale = rsqrt(dot(pixelSize, pixelSize)); | |||
scale *= abs(input.texcoord1.y) * _GradientScale * 1.5; | |||
if(UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); | |||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; | |||
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; | |||
float layerScale = scale; | |||
scale /= 1 + (_OutlineSoftness * _ScaleRatioA * scale); | |||
float bias = (0.5 - weight) * scale - 0.5; | |||
float outline = _OutlineWidth * _ScaleRatioA * 0.5 * scale; | |||
float opacity = input.color.a; | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
opacity = 1.0; | |||
#endif | |||
fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; | |||
faceColor.rgb *= faceColor.a; | |||
fixed4 outlineColor = _OutlineColor; | |||
outlineColor.a *= opacity; | |||
outlineColor.rgb *= outlineColor.a; | |||
outlineColor = lerp(faceColor, outlineColor, sqrt(min(1.0, (outline * 2)))); | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
layerScale /= 1 + ((_UnderlaySoftness * _ScaleRatioC) * layerScale); | |||
float layerBias = (.5 - weight) * layerScale - .5 - ((_UnderlayDilate * _ScaleRatioC) * .5 * layerScale); | |||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; | |||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; | |||
float2 layerOffset = float2(x, y); | |||
#endif | |||
// Generate UV for the Masking Texture | |||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); | |||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); | |||
// Structure for pixel shader | |||
pixel_t output = { | |||
vPosition, | |||
faceColor, | |||
outlineColor, | |||
float4(input.texcoord0.x, input.texcoord0.y, maskUV.x, maskUV.y), | |||
half4(scale, bias - outline, bias + outline, bias), | |||
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)), | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
float4(input.texcoord0 + layerOffset, input.color.a, 0), | |||
half2(layerScale, layerBias), | |||
#endif | |||
}; | |||
return output; | |||
} | |||
// PIXEL SHADER | |||
fixed4 PixShader(pixel_t input) : SV_Target | |||
{ | |||
half d = tex2D(_MainTex, input.texcoord0.xy).a * input.param.x; | |||
half4 c = input.faceColor * saturate(d - input.param.w); | |||
#ifdef OUTLINE_ON | |||
c = lerp(input.outlineColor, input.faceColor, saturate(d - input.param.z)); | |||
c *= saturate(d - input.param.y); | |||
#endif | |||
#if UNDERLAY_ON | |||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; | |||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * saturate(d - input.underlayParam.y) * (1 - c.a); | |||
#endif | |||
#if UNDERLAY_INNER | |||
half sd = saturate(d - input.param.z); | |||
d = tex2D(_MainTex, input.texcoord1.xy).a * input.underlayParam.x; | |||
c += float4(_UnderlayColor.rgb * _UnderlayColor.a, _UnderlayColor.a) * (1 - saturate(d - input.underlayParam.y)) * sd * (1 - c.a); | |||
#endif | |||
// Alternative implementation to UnityGet2DClipping with support for softness. | |||
#if UNITY_UI_CLIP_RECT | |||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); | |||
c *= m.x * m.y; | |||
#endif | |||
#if (UNDERLAY_ON | UNDERLAY_INNER) | |||
c *= input.texcoord1.z; | |||
#endif | |||
#if UNITY_UI_ALPHACLIP | |||
clip(c.a - 0.001); | |||
#endif | |||
return c; | |||
} | |||
ENDCG | |||
} | |||
} | |||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" | |||
} |
@ -1,136 +0,0 @@ | |||
// Simplified version of the SDF Surface shader : | |||
// - No support for Bevel, Bump or envmap | |||
// - Diffuse only lighting | |||
// - Fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH. | |||
Shader "TextMeshPro/Mobile/Distance Field (Surface)" { | |||
Properties { | |||
_FaceTex ("Fill Texture", 2D) = "white" {} | |||
_FaceColor ("Fill Color", Color) = (1,1,1,1) | |||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0 | |||
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |||
_OutlineTex ("Outline Texture", 2D) = "white" {} | |||
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 | |||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0 | |||
_GlowColor ("Color", Color) = (0, 1, 0, 0.5) | |||
_GlowOffset ("Offset", Range(-1,1)) = 0 | |||
_GlowInner ("Inner", Range(0,1)) = 0.05 | |||
_GlowOuter ("Outer", Range(0,1)) = 0.05 | |||
_GlowPower ("Falloff", Range(1, 0)) = 0.75 | |||
_WeightNormal ("Weight Normal", float) = 0 | |||
_WeightBold ("Weight Bold", float) = 0.5 | |||
// Should not be directly exposed to the user | |||
_ShaderFlags ("Flags", float) = 0 | |||
_ScaleRatioA ("Scale RatioA", float) = 1 | |||
_ScaleRatioB ("Scale RatioB", float) = 1 | |||
_ScaleRatioC ("Scale RatioC", float) = 1 | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_TextureWidth ("Texture Width", float) = 512 | |||
_TextureHeight ("Texture Height", float) = 512 | |||
_GradientScale ("Gradient Scale", float) = 5.0 | |||
_ScaleX ("Scale X", float) = 1.0 | |||
_ScaleY ("Scale Y", float) = 1.0 | |||
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 | |||
_VertexOffsetX ("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY ("Vertex OffsetY", float) = 0 | |||
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0) | |||
//_MaskSoftness ("Mask Softness", float) = 0 | |||
} | |||
SubShader { | |||
Tags { | |||
"Queue"="Transparent" | |||
"IgnoreProjector"="True" | |||
"RenderType"="Transparent" | |||
} | |||
LOD 300 | |||
Cull [_CullMode] | |||
CGPROGRAM | |||
#pragma surface PixShader Lambert alpha:blend vertex:VertShader noforwardadd nolightmap nodirlightmap | |||
#pragma target 3.0 | |||
#pragma shader_feature __ GLOW_ON | |||
#include "TMPro_Properties.cginc" | |||
#include "TMPro.cginc" | |||
half _FaceShininess; | |||
half _OutlineShininess; | |||
struct Input | |||
{ | |||
fixed4 color : COLOR; | |||
float2 uv_MainTex; | |||
float2 uv2_FaceTex; | |||
float2 uv2_OutlineTex; | |||
float2 param; // Weight, Scale | |||
float3 viewDirEnv; | |||
}; | |||
#include "TMPro_Surface.cginc" | |||
ENDCG | |||
// Pass to render object as a shadow caster | |||
Pass | |||
{ | |||
Name "Caster" | |||
Tags { "LightMode" = "ShadowCaster" } | |||
Offset 1, 1 | |||
Fog {Mode Off} | |||
ZWrite On ZTest LEqual Cull Off | |||
CGPROGRAM | |||
#pragma vertex vert | |||
#pragma fragment frag | |||
#pragma multi_compile_shadowcaster | |||
#include "UnityCG.cginc" | |||
struct v2f { | |||
V2F_SHADOW_CASTER; | |||
float2 uv : TEXCOORD1; | |||
float2 uv2 : TEXCOORD3; | |||
float alphaClip : TEXCOORD2; | |||
}; | |||
uniform float4 _MainTex_ST; | |||
uniform float4 _OutlineTex_ST; | |||
float _OutlineWidth; | |||
float _FaceDilate; | |||
float _ScaleRatioA; | |||
v2f vert( appdata_base v ) | |||
{ | |||
v2f o; | |||
TRANSFER_SHADOW_CASTER(o) | |||
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); | |||
o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex); | |||
o.alphaClip = o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2; | |||
return o; | |||
} | |||
uniform sampler2D _MainTex; | |||
float4 frag(v2f i) : COLOR | |||
{ | |||
fixed4 texcol = tex2D(_MainTex, i.uv).a; | |||
clip(texcol.a - i.alphaClip); | |||
SHADOW_CASTER_FRAGMENT(i) | |||
} | |||
ENDCG | |||
} | |||
} | |||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" | |||
} |
@ -1,155 +0,0 @@ | |||
Shader "TextMeshPro/Distance Field (Surface)" { | |||
Properties { | |||
_FaceTex ("Fill Texture", 2D) = "white" {} | |||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 | |||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 | |||
_FaceColor ("Fill Color", Color) = (1,1,1,1) | |||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0 | |||
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |||
_OutlineTex ("Outline Texture", 2D) = "white" {} | |||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 | |||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 | |||
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 | |||
_OutlineSoftness ("Outline Softness", Range(0,1)) = 0 | |||
_Bevel ("Bevel", Range(0,1)) = 0.5 | |||
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 | |||
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 | |||
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0 | |||
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 | |||
_BumpMap ("Normalmap", 2D) = "bump" {} | |||
_BumpOutline ("Bump Outline", Range(0,1)) = 0.5 | |||
_BumpFace ("Bump Face", Range(0,1)) = 0.5 | |||
_ReflectFaceColor ("Face Color", Color) = (0,0,0,1) | |||
_ReflectOutlineColor ("Outline Color", Color) = (0,0,0,1) | |||
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } | |||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) | |||
_SpecColor ("Specular Color", Color) = (0,0,0,1) | |||
_FaceShininess ("Face Shininess", Range(0,1)) = 0 | |||
_OutlineShininess ("Outline Shininess", Range(0,1)) = 0 | |||
_GlowColor ("Color", Color) = (0, 1, 0, 0.5) | |||
_GlowOffset ("Offset", Range(-1,1)) = 0 | |||
_GlowInner ("Inner", Range(0,1)) = 0.05 | |||
_GlowOuter ("Outer", Range(0,1)) = 0.05 | |||
_GlowPower ("Falloff", Range(1, 0)) = 0.75 | |||
_WeightNormal ("Weight Normal", float) = 0 | |||
_WeightBold ("Weight Bold", float) = 0.5 | |||
// Should not be directly exposed to the user | |||
_ShaderFlags ("Flags", float) = 0 | |||
_ScaleRatioA ("Scale RatioA", float) = 1 | |||
_ScaleRatioB ("Scale RatioB", float) = 1 | |||
_ScaleRatioC ("Scale RatioC", float) = 1 | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_TextureWidth ("Texture Width", float) = 512 | |||
_TextureHeight ("Texture Height", float) = 512 | |||
_GradientScale ("Gradient Scale", float) = 5.0 | |||
_ScaleX ("Scale X", float) = 1.0 | |||
_ScaleY ("Scale Y", float) = 1.0 | |||
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 | |||
_VertexOffsetX ("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY ("Vertex OffsetY", float) = 0 | |||
//_MaskCoord ("Mask Coords", vector) = (0,0,0,0) | |||
//_MaskSoftness ("Mask Softness", float) = 0 | |||
} | |||
SubShader { | |||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } | |||
LOD 300 | |||
Cull [_CullMode] | |||
CGPROGRAM | |||
#pragma surface PixShader BlinnPhong alpha:blend vertex:VertShader nolightmap nodirlightmap | |||
#pragma target 3.0 | |||
#pragma shader_feature __ GLOW_ON | |||
#pragma glsl | |||
#include "TMPro_Properties.cginc" | |||
#include "TMPro.cginc" | |||
half _FaceShininess; | |||
half _OutlineShininess; | |||
struct Input | |||
{ | |||
fixed4 color : COLOR; | |||
float2 uv_MainTex; | |||
float2 uv2_FaceTex; | |||
float2 uv2_OutlineTex; | |||
float2 param; // Weight, Scale | |||
float3 viewDirEnv; | |||
}; | |||
#define BEVEL_ON 1 | |||
#include "TMPro_Surface.cginc" | |||
ENDCG | |||
// Pass to render object as a shadow caster | |||
Pass | |||
{ | |||
Name "Caster" | |||
Tags { "LightMode" = "ShadowCaster" } | |||
Offset 1, 1 | |||
Fog {Mode Off} | |||
ZWrite On | |||
ZTest LEqual | |||
Cull Off | |||
CGPROGRAM | |||
#pragma vertex vert | |||
#pragma fragment frag | |||
#pragma multi_compile_shadowcaster | |||
#include "UnityCG.cginc" | |||
struct v2f { | |||
V2F_SHADOW_CASTER; | |||
float2 uv : TEXCOORD1; | |||
float2 uv2 : TEXCOORD3; | |||
float alphaClip : TEXCOORD2; | |||
}; | |||
uniform float4 _MainTex_ST; | |||
uniform float4 _OutlineTex_ST; | |||
float _OutlineWidth; | |||
float _FaceDilate; | |||
float _ScaleRatioA; | |||
v2f vert( appdata_base v ) | |||
{ | |||
v2f o; | |||
TRANSFER_SHADOW_CASTER(o) | |||
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); | |||
o.uv2 = TRANSFORM_TEX(v.texcoord, _OutlineTex); | |||
o.alphaClip = (1.0 - _OutlineWidth * _ScaleRatioA - _FaceDilate * _ScaleRatioA) / 2; | |||
return o; | |||
} | |||
uniform sampler2D _MainTex; | |||
float4 frag(v2f i) : COLOR | |||
{ | |||
fixed4 texcol = tex2D(_MainTex, i.uv).a; | |||
clip(texcol.a - i.alphaClip); | |||
SHADOW_CASTER_FRAGMENT(i) | |||
} | |||
ENDCG | |||
} | |||
} | |||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" | |||
} | |||
@ -1,305 +0,0 @@ | |||
Shader "TextMeshPro/Distance Field" { | |||
Properties { | |||
_FaceTex ("Face Texture", 2D) = "white" {} | |||
_FaceUVSpeedX ("Face UV Speed X", Range(-5, 5)) = 0.0 | |||
_FaceUVSpeedY ("Face UV Speed Y", Range(-5, 5)) = 0.0 | |||
_FaceColor ("Face Color", Color) = (1,1,1,1) | |||
_FaceDilate ("Face Dilate", Range(-1,1)) = 0 | |||
_OutlineColor ("Outline Color", Color) = (0,0,0,1) | |||
_OutlineTex ("Outline Texture", 2D) = "white" {} | |||
_OutlineUVSpeedX ("Outline UV Speed X", Range(-5, 5)) = 0.0 | |||
_OutlineUVSpeedY ("Outline UV Speed Y", Range(-5, 5)) = 0.0 | |||
_OutlineWidth ("Outline Thickness", Range(0, 1)) = 0 | |||
_OutlineSoftness ("Outline Softness", Range(-1,1)) = 0 | |||
_Bevel ("Bevel", Range(0,1)) = 0.5 | |||
_BevelOffset ("Bevel Offset", Range(-0.5,0.5)) = 0 | |||
_BevelWidth ("Bevel Width", Range(-.5,0.5)) = 0 | |||
_BevelClamp ("Bevel Clamp", Range(0,1)) = 0 | |||
_BevelRoundness ("Bevel Roundness", Range(0,1)) = 0 | |||
_LightAngle ("Light Angle", Range(0.0, 6.2831853)) = 3.1416 | |||
_SpecularColor ("Specular", Color) = (1,1,1,1) | |||
_SpecularPower ("Specular", Range(0,4)) = 2.0 | |||
_Reflectivity ("Reflectivity", Range(5.0,15.0)) = 10 | |||
_Diffuse ("Diffuse", Range(0,1)) = 0.5 | |||
_Ambient ("Ambient", Range(1,0)) = 0.5 | |||
_BumpMap ("Normal map", 2D) = "bump" {} | |||
_BumpOutline ("Bump Outline", Range(0,1)) = 0 | |||
_BumpFace ("Bump Face", Range(0,1)) = 0 | |||
_ReflectFaceColor ("Reflection Color", Color) = (0,0,0,1) | |||
_ReflectOutlineColor("Reflection Color", Color) = (0,0,0,1) | |||
_Cube ("Reflection Cubemap", Cube) = "black" { /* TexGen CubeReflect */ } | |||
_EnvMatrixRotation ("Texture Rotation", vector) = (0, 0, 0, 0) | |||
_UnderlayColor ("Border Color", Color) = (0,0,0, 0.5) | |||
_UnderlayOffsetX ("Border OffsetX", Range(-1,1)) = 0 | |||
_UnderlayOffsetY ("Border OffsetY", Range(-1,1)) = 0 | |||
_UnderlayDilate ("Border Dilate", Range(-1,1)) = 0 | |||
_UnderlaySoftness ("Border Softness", Range(0,1)) = 0 | |||
_GlowColor ("Color", Color) = (0, 1, 0, 0.5) | |||
_GlowOffset ("Offset", Range(-1,1)) = 0 | |||
_GlowInner ("Inner", Range(0,1)) = 0.05 | |||
_GlowOuter ("Outer", Range(0,1)) = 0.05 | |||
_GlowPower ("Falloff", Range(1, 0)) = 0.75 | |||
_WeightNormal ("Weight Normal", float) = 0 | |||
_WeightBold ("Weight Bold", float) = 0.5 | |||
_ShaderFlags ("Flags", float) = 0 | |||
_ScaleRatioA ("Scale RatioA", float) = 1 | |||
_ScaleRatioB ("Scale RatioB", float) = 1 | |||
_ScaleRatioC ("Scale RatioC", float) = 1 | |||
_MainTex ("Font Atlas", 2D) = "white" {} | |||
_TextureWidth ("Texture Width", float) = 512 | |||
_TextureHeight ("Texture Height", float) = 512 | |||
_GradientScale ("Gradient Scale", float) = 5.0 | |||
_ScaleX ("Scale X", float) = 1.0 | |||
_ScaleY ("Scale Y", float) = 1.0 | |||
_PerspectiveFilter ("Perspective Correction", Range(0, 1)) = 0.875 | |||
_VertexOffsetX ("Vertex OffsetX", float) = 0 | |||
_VertexOffsetY ("Vertex OffsetY", float) = 0 | |||
_MaskCoord ("Mask Coordinates", vector) = (0, 0, 32767, 32767) | |||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) | |||
_MaskSoftnessX ("Mask SoftnessX", float) = 0 | |||
_MaskSoftnessY ("Mask SoftnessY", float) = 0 | |||
_StencilComp ("Stencil Comparison", Float) = 8 | |||
_Stencil ("Stencil ID", Float) = 0 | |||
_StencilOp ("Stencil Operation", Float) = 0 | |||
_StencilWriteMask ("Stencil Write Mask", Float) = 255 | |||
_StencilReadMask ("Stencil Read Mask", Float) = 255 | |||
_ColorMask ("Color Mask", Float) = 15 | |||
} | |||
SubShader { | |||
Tags | |||
{ | |||
"Queue"="Transparent" | |||
"IgnoreProjector"="True" | |||
"RenderType"="Transparent" | |||
} | |||
Stencil | |||
{ | |||
Ref [_Stencil] | |||
Comp [_StencilComp] | |||
Pass [_StencilOp] | |||
ReadMask [_StencilReadMask] | |||
WriteMask [_StencilWriteMask] | |||
} | |||
Cull [_CullMode] | |||
ZWrite Off | |||
Lighting Off | |||
Fog { Mode Off } | |||
ZTest [unity_GUIZTestMode] | |||
Blend One OneMinusSrcAlpha | |||
ColorMask [_ColorMask] | |||
Pass { | |||
CGPROGRAM | |||
#pragma target 3.0 | |||
#pragma vertex VertShader | |||
#pragma fragment PixShader | |||
#pragma shader_feature __ BEVEL_ON | |||
#pragma shader_feature __ UNDERLAY_ON UNDERLAY_INNER | |||
#pragma shader_feature __ GLOW_ON | |||
#pragma multi_compile __ UNITY_UI_CLIP_RECT | |||
#pragma multi_compile __ UNITY_UI_ALPHACLIP | |||
#include "UnityCG.cginc" | |||
#include "UnityUI.cginc" | |||
#include "TMPro_Properties.cginc" | |||
#include "TMPro.cginc" | |||
struct vertex_t { | |||
float4 position : POSITION; | |||
float3 normal : NORMAL; | |||
fixed4 color : COLOR; | |||
float2 texcoord0 : TEXCOORD0; | |||
float2 texcoord1 : TEXCOORD1; | |||
}; | |||
struct pixel_t { | |||
float4 position : SV_POSITION; | |||
fixed4 color : COLOR; | |||
float2 atlas : TEXCOORD0; // Atlas | |||
float4 param : TEXCOORD1; // alphaClip, scale, bias, weight | |||
float4 mask : TEXCOORD2; // Position in object space(xy), pixel Size(zw) | |||
float3 viewDir : TEXCOORD3; | |||
#if (UNDERLAY_ON || UNDERLAY_INNER) | |||
float4 texcoord2 : TEXCOORD4; // u,v, scale, bias | |||
fixed4 underlayColor : COLOR1; | |||
#endif | |||
float4 textures : TEXCOORD5; | |||
}; | |||
// Used by Unity internally to handle Texture Tiling and Offset. | |||
float4 _FaceTex_ST; | |||
float4 _OutlineTex_ST; | |||
pixel_t VertShader(vertex_t input) | |||
{ | |||
float bold = step(input.texcoord1.y, 0); | |||
float4 vert = input.position; | |||
vert.x += _VertexOffsetX; | |||
vert.y += _VertexOffsetY; | |||
float4 vPosition = UnityObjectToClipPos(vert); | |||
float2 pixelSize = vPosition.w; | |||
pixelSize /= float2(_ScaleX, _ScaleY) * abs(mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy)); | |||
float scale = rsqrt(dot(pixelSize, pixelSize)); | |||
scale *= abs(input.texcoord1.y) * _GradientScale * 1.5; | |||
if (UNITY_MATRIX_P[3][3] == 0) scale = lerp(abs(scale) * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(input.normal.xyz), normalize(WorldSpaceViewDir(vert))))); | |||
float weight = lerp(_WeightNormal, _WeightBold, bold) / 4.0; | |||
weight = (weight + _FaceDilate) * _ScaleRatioA * 0.5; | |||
float bias =(.5 - weight) + (.5 / scale); | |||
float alphaClip = (1.0 - _OutlineWidth*_ScaleRatioA - _OutlineSoftness*_ScaleRatioA); | |||
#if GLOW_ON | |||
alphaClip = min(alphaClip, 1.0 - _GlowOffset * _ScaleRatioB - _GlowOuter * _ScaleRatioB); | |||
#endif | |||
alphaClip = alphaClip / 2.0 - ( .5 / scale) - weight; | |||
#if (UNDERLAY_ON || UNDERLAY_INNER) | |||
float4 underlayColor = _UnderlayColor; | |||
underlayColor.rgb *= underlayColor.a; | |||
float bScale = scale; | |||
bScale /= 1 + ((_UnderlaySoftness*_ScaleRatioC) * bScale); | |||
float bBias = (0.5 - weight) * bScale - 0.5 - ((_UnderlayDilate * _ScaleRatioC) * 0.5 * bScale); | |||
float x = -(_UnderlayOffsetX * _ScaleRatioC) * _GradientScale / _TextureWidth; | |||
float y = -(_UnderlayOffsetY * _ScaleRatioC) * _GradientScale / _TextureHeight; | |||
float2 bOffset = float2(x, y); | |||
#endif | |||
// Generate UV for the Masking Texture | |||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); | |||
float2 maskUV = (vert.xy - clampedRect.xy) / (clampedRect.zw - clampedRect.xy); | |||
// Support for texture tiling and offset | |||
float2 textureUV = UnpackUV(input.texcoord1.x); | |||
float2 faceUV = TRANSFORM_TEX(textureUV, _FaceTex); | |||
float2 outlineUV = TRANSFORM_TEX(textureUV, _OutlineTex); | |||
pixel_t output = { | |||
vPosition, | |||
input.color, | |||
input.texcoord0, | |||
float4(alphaClip, scale, bias, weight), | |||
half4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)), | |||
mul((float3x3)_EnvMatrix, _WorldSpaceCameraPos.xyz - mul(unity_ObjectToWorld, vert).xyz), | |||
#if (UNDERLAY_ON || UNDERLAY_INNER) | |||
float4(input.texcoord0 + bOffset, bScale, bBias), | |||
underlayColor, | |||
#endif | |||
float4(faceUV, outlineUV), | |||
}; | |||
return output; | |||
} | |||
fixed4 PixShader(pixel_t input) : SV_Target | |||
{ | |||
float c = tex2D(_MainTex, input.atlas).a; | |||
#ifndef UNDERLAY_ON | |||
clip(c - input.param.x); | |||
#endif | |||
float scale = input.param.y; | |||
float bias = input.param.z; | |||
float weight = input.param.w; | |||
float sd = (bias - c) * scale; | |||
float outline = (_OutlineWidth * _ScaleRatioA) * scale; | |||
float softness = (_OutlineSoftness * _ScaleRatioA) * scale; | |||
half4 faceColor = _FaceColor; | |||
half4 outlineColor = _OutlineColor; | |||
faceColor.rgb *= input.color.rgb; | |||
faceColor *= tex2D(_FaceTex, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y); | |||
outlineColor *= tex2D(_OutlineTex, input.textures.zw + float2(_OutlineUVSpeedX, _OutlineUVSpeedY) * _Time.y); | |||
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); | |||
#if BEVEL_ON | |||
float3 dxy = float3(0.5 / _TextureWidth, 0.5 / _TextureHeight, 0); | |||
float3 n = GetSurfaceNormal(input.atlas, weight, dxy); | |||
float3 bump = UnpackNormal(tex2D(_BumpMap, input.textures.xy + float2(_FaceUVSpeedX, _FaceUVSpeedY) * _Time.y)).xyz; | |||
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); | |||
n = normalize(n- bump); | |||
float3 light = normalize(float3(sin(_LightAngle), cos(_LightAngle), -1.0)); | |||
float3 col = GetSpecular(n, light); | |||
faceColor.rgb += col*faceColor.a; | |||
faceColor.rgb *= 1-(dot(n, light)*_Diffuse); | |||
faceColor.rgb *= lerp(_Ambient, 1, n.z*n.z); | |||
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDir, -n)); | |||
faceColor.rgb += reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; | |||
#endif | |||
#if UNDERLAY_ON | |||
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; | |||
faceColor += input.underlayColor * saturate(d - input.texcoord2.w) * (1 - faceColor.a); | |||
#endif | |||
#if UNDERLAY_INNER | |||
float d = tex2D(_MainTex, input.texcoord2.xy).a * input.texcoord2.z; | |||
faceColor += input.underlayColor * (1 - saturate(d - input.texcoord2.w)) * saturate(1 - sd) * (1 - faceColor.a); | |||
#endif | |||
#if GLOW_ON | |||
float4 glowColor = GetGlowColor(sd, scale); | |||
faceColor.rgb += glowColor.rgb * glowColor.a; | |||
#endif | |||
// Alternative implementation to UnityGet2DClipping with support for softness. | |||
#if UNITY_UI_CLIP_RECT | |||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(input.mask.xy)) * input.mask.zw); | |||
faceColor *= m.x * m.y; | |||
#endif | |||
#if UNITY_UI_ALPHACLIP | |||
clip(faceColor.a - 0.001); | |||
#endif | |||
return faceColor * input.color.a; | |||
} | |||
ENDCG | |||
} | |||
} | |||
Fallback "TextMeshPro/Mobile/Distance Field" | |||
CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" | |||
} |
@ -1,113 +0,0 @@ | |||
Shader "TextMeshPro/Sprite" | |||
{ | |||
Properties | |||
{ | |||
_MainTex ("Sprite Texture", 2D) = "white" {} | |||
_Color ("Tint", Color) = (1,1,1,1) | |||
_StencilComp ("Stencil Comparison", Float) = 8 | |||
_Stencil ("Stencil ID", Float) = 0 | |||
_StencilOp ("Stencil Operation", Float) = 0 | |||
_StencilWriteMask ("Stencil Write Mask", Float) = 255 | |||
_StencilReadMask ("Stencil Read Mask", Float) = 255 | |||
_ColorMask ("Color Mask", Float) = 15 | |||
_ClipRect ("Clip Rect", vector) = (-32767, -32767, 32767, 32767) | |||
[Toggle(UNITY_UI_ALPHACLIP)] _UseUIAlphaClip ("Use Alpha Clip", Float) = 0 | |||
} | |||
SubShader | |||
{ | |||
Tags | |||
{ | |||
"Queue"="Transparent" | |||
"IgnoreProjector"="True" | |||
"RenderType"="Transparent" | |||
"PreviewType"="Plane" | |||
"CanUseSpriteAtlas"="True" | |||
} | |||
Stencil | |||
{ | |||
Ref [_Stencil] | |||
Comp [_StencilComp] | |||
Pass [_StencilOp] | |||
ReadMask [_StencilReadMask] | |||
WriteMask [_StencilWriteMask] | |||
} | |||
Cull Off | |||
Lighting Off | |||
ZWrite Off | |||
ZTest [unity_GUIZTestMode] | |||
Blend SrcAlpha OneMinusSrcAlpha | |||
ColorMask [_ColorMask] | |||
Pass | |||
{ | |||
CGPROGRAM | |||
#pragma vertex vert | |||
#pragma fragment frag | |||
#include "UnityCG.cginc" | |||
#include "UnityUI.cginc" | |||
#pragma multi_compile __ UNITY_UI_CLIP_RECT | |||
#pragma multi_compile __ UNITY_UI_ALPHACLIP | |||
struct appdata_t | |||
{ | |||
float4 vertex : POSITION; | |||
float4 color : COLOR; | |||
float2 texcoord : TEXCOORD0; | |||
}; | |||
struct v2f | |||
{ | |||
float4 vertex : SV_POSITION; | |||
fixed4 color : COLOR; | |||
half2 texcoord : TEXCOORD0; | |||
float4 worldPosition : TEXCOORD1; | |||
}; | |||
fixed4 _Color; | |||
fixed4 _TextureSampleAdd; | |||
float4 _ClipRect; | |||
v2f vert(appdata_t IN) | |||
{ | |||
v2f OUT; | |||
OUT.worldPosition = IN.vertex; | |||
OUT.vertex = UnityObjectToClipPos(OUT.worldPosition); | |||
OUT.texcoord = IN.texcoord; | |||
#ifdef UNITY_HALF_TEXEL_OFFSET | |||
OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1); | |||
#endif | |||
OUT.color = IN.color * _Color; | |||
return OUT; | |||
} | |||
sampler2D _MainTex; | |||
fixed4 frag(v2f IN) : SV_Target | |||
{ | |||
half4 color = (tex2D(_MainTex, IN.texcoord) + _TextureSampleAdd) * IN.color; | |||
#if UNITY_UI_CLIP_RECT | |||
color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect); | |||
#endif | |||
#ifdef UNITY_UI_ALPHACLIP | |||
clip (color.a - 0.001); | |||
#endif | |||
return color; | |||
} | |||
ENDCG | |||
} | |||
} | |||
} |
@ -1,84 +0,0 @@ | |||
float2 UnpackUV(float uv) | |||
{ | |||
float2 output; | |||
output.x = floor(uv / 4096); | |||
output.y = uv - 4096 * output.x; | |||
return output * 0.001953125; | |||
} | |||
fixed4 GetColor(half d, fixed4 faceColor, fixed4 outlineColor, half outline, half softness) | |||
{ | |||
half faceAlpha = 1-saturate((d - outline * 0.5 + softness * 0.5) / (1.0 + softness)); | |||
half outlineAlpha = saturate((d + outline * 0.5)) * sqrt(min(1.0, outline)); | |||
faceColor.rgb *= faceColor.a; | |||
outlineColor.rgb *= outlineColor.a; | |||
faceColor = lerp(faceColor, outlineColor, outlineAlpha); | |||
faceColor *= faceAlpha; | |||
return faceColor; | |||
} | |||
float3 GetSurfaceNormal(float4 h, float bias) | |||
{ | |||
bool raisedBevel = step(1, fmod(_ShaderFlags, 2)); | |||
h += bias+_BevelOffset; | |||
float bevelWidth = max(.01, _OutlineWidth+_BevelWidth); | |||
// Track outline | |||
h -= .5; | |||
h /= bevelWidth; | |||
h = saturate(h+.5); | |||
if(raisedBevel) h = 1 - abs(h*2.0 - 1.0); | |||
h = lerp(h, sin(h*3.141592/2.0), _BevelRoundness); | |||
h = min(h, 1.0-_BevelClamp); | |||
h *= _Bevel * bevelWidth * _GradientScale * -2.0; | |||
float3 va = normalize(float3(1.0, 0.0, h.y - h.x)); | |||
float3 vb = normalize(float3(0.0, -1.0, h.w - h.z)); | |||
return cross(va, vb); | |||
} | |||
float3 GetSurfaceNormal(float2 uv, float bias, float3 delta) | |||
{ | |||
// Read "height field" | |||
float4 h = {tex2D(_MainTex, uv - delta.xz).a, | |||
tex2D(_MainTex, uv + delta.xz).a, | |||
tex2D(_MainTex, uv - delta.zy).a, | |||
tex2D(_MainTex, uv + delta.zy).a}; | |||
return GetSurfaceNormal(h, bias); | |||
} | |||
float3 GetSpecular(float3 n, float3 l) | |||
{ | |||
float spec = pow(max(0.0, dot(n, l)), _Reflectivity); | |||
return _SpecularColor.rgb * spec * _SpecularPower; | |||
} | |||
float4 GetGlowColor(float d, float scale) | |||
{ | |||
float glow = d - (_GlowOffset*_ScaleRatioB) * 0.5 * scale; | |||
float t = lerp(_GlowInner, (_GlowOuter * _ScaleRatioB), step(0.0, glow)) * 0.5 * scale; | |||
glow = saturate(abs(glow/(1.0 + t))); | |||
glow = 1.0-pow(glow, _GlowPower); | |||
glow *= sqrt(min(1.0, t)); // Fade off glow thinner than 1 screen pixel | |||
return float4(_GlowColor.rgb, saturate(_GlowColor.a * glow * 2)); | |||
} | |||
float4 BlendARGB(float4 overlying, float4 underlying) | |||
{ | |||
overlying.rgb *= overlying.a; | |||
underlying.rgb *= underlying.a; | |||
float3 blended = overlying.rgb + ((1-overlying.a)*underlying.rgb); | |||
float alpha = underlying.a + (1-underlying.a)*overlying.a; | |||
return float4(blended, alpha); | |||
} | |||
@ -1,84 +0,0 @@ | |||
// UI Editable properties | |||
uniform sampler2D _FaceTex; // Alpha : Signed Distance | |||
uniform float _FaceUVSpeedX; | |||
uniform float _FaceUVSpeedY; | |||
uniform fixed4 _FaceColor; // RGBA : Color + Opacity | |||
uniform float _FaceDilate; // v[ 0, 1] | |||
uniform float _OutlineSoftness; // v[ 0, 1] | |||
uniform sampler2D _OutlineTex; // RGBA : Color + Opacity | |||
uniform float _OutlineUVSpeedX; | |||
uniform float _OutlineUVSpeedY; | |||
uniform fixed4 _OutlineColor; // RGBA : Color + Opacity | |||
uniform float _OutlineWidth; // v[ 0, 1] | |||
uniform float _Bevel; // v[ 0, 1] | |||
uniform float _BevelOffset; // v[-1, 1] | |||
uniform float _BevelWidth; // v[-1, 1] | |||
uniform float _BevelClamp; // v[ 0, 1] | |||
uniform float _BevelRoundness; // v[ 0, 1] | |||
uniform sampler2D _BumpMap; // Normal map | |||
uniform float _BumpOutline; // v[ 0, 1] | |||
uniform float _BumpFace; // v[ 0, 1] | |||
uniform samplerCUBE _Cube; // Cube / sphere map | |||
uniform fixed4 _ReflectFaceColor; // RGB intensity | |||
uniform fixed4 _ReflectOutlineColor; | |||
//uniform float _EnvTiltX; // v[-1, 1] | |||
//uniform float _EnvTiltY; // v[-1, 1] | |||
uniform float3 _EnvMatrixRotation; | |||
uniform float4x4 _EnvMatrix; | |||
uniform fixed4 _SpecularColor; // RGB intensity | |||
uniform float _LightAngle; // v[ 0,Tau] | |||
uniform float _SpecularPower; // v[ 0, 1] | |||
uniform float _Reflectivity; // v[ 5, 15] | |||
uniform float _Diffuse; // v[ 0, 1] | |||
uniform float _Ambient; // v[ 0, 1] | |||
uniform fixed4 _UnderlayColor; // RGBA : Color + Opacity | |||
uniform float _UnderlayOffsetX; // v[-1, 1] | |||
uniform float _UnderlayOffsetY; // v[-1, 1] | |||
uniform float _UnderlayDilate; // v[-1, 1] | |||
uniform float _UnderlaySoftness; // v[ 0, 1] | |||
uniform fixed4 _GlowColor; // RGBA : Color + Intesity | |||
uniform float _GlowOffset; // v[-1, 1] | |||
uniform float _GlowOuter; // v[ 0, 1] | |||
uniform float _GlowInner; // v[ 0, 1] | |||
uniform float _GlowPower; // v[ 1, 1/(1+4*4)] | |||
// API Editable properties | |||
uniform float _ShaderFlags; | |||
uniform float _WeightNormal; | |||
uniform float _WeightBold; | |||
uniform float _ScaleRatioA; | |||
uniform float _ScaleRatioB; | |||
uniform float _ScaleRatioC; | |||
uniform float _VertexOffsetX; | |||
uniform float _VertexOffsetY; | |||
//uniform float _UseClipRect; | |||
uniform float _MaskID; | |||
uniform sampler2D _MaskTex; | |||
uniform float4 _MaskCoord; | |||
uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w) | |||
//uniform float _MaskWipeControl; | |||
//uniform float _MaskEdgeSoftness; | |||
//uniform fixed4 _MaskEdgeColor; | |||
//uniform bool _MaskInverse; | |||
uniform float _MaskSoftnessX; | |||
uniform float _MaskSoftnessY; | |||
// Font Atlas properties | |||
uniform sampler2D _MainTex; | |||
uniform float _TextureWidth; | |||
uniform float _TextureHeight; | |||
uniform float _GradientScale; | |||
uniform float _ScaleX; | |||
uniform float _ScaleY; | |||
uniform float _PerspectiveFilter; |
@ -1,115 +0,0 @@ | |||
void VertShader(inout appdata_full v, out Input data) | |||
{ | |||
v.vertex.x += _VertexOffsetX; | |||
v.vertex.y += _VertexOffsetY; | |||
UNITY_INITIALIZE_OUTPUT(Input, data); | |||
float bold = step(v.texcoord1.y, 0); | |||
// Generate normal for backface | |||
float3 view = ObjSpaceViewDir(v.vertex); | |||
v.normal *= sign(dot(v.normal, view)); | |||
#if USE_DERIVATIVE | |||
data.param.y = 1; | |||
#else | |||
float4 vert = v.vertex; | |||
float4 vPosition = UnityObjectToClipPos(vert); | |||
float2 pixelSize = vPosition.w; | |||
pixelSize /= float2(_ScaleX, _ScaleY) * mul((float2x2)UNITY_MATRIX_P, _ScreenParams.xy); | |||
float scale = rsqrt(dot(pixelSize, pixelSize)); | |||
scale *= abs(v.texcoord1.y) * _GradientScale * 1.5; | |||
scale = lerp(scale * (1 - _PerspectiveFilter), scale, abs(dot(UnityObjectToWorldNormal(v.normal.xyz), normalize(WorldSpaceViewDir(vert))))); | |||
data.param.y = scale; | |||
#endif | |||
//float opacity = v.color.a; | |||
data.param.x = (lerp(_WeightNormal, _WeightBold, bold) / 4.0 + _FaceDilate) * _ScaleRatioA * 0.5; // | |||
v.texcoord1.xy = UnpackUV(v.texcoord1.x); | |||
data.viewDirEnv = mul((float3x3)_EnvMatrix, WorldSpaceViewDir(v.vertex)); | |||
} | |||
void PixShader(Input input, inout SurfaceOutput o) | |||
{ | |||
#if USE_DERIVATIVE | BEVEL_ON | |||
float3 delta = float3(1.0 / _TextureWidth, 1.0 / _TextureHeight, 0.0); | |||
float4 smp4x = { tex2D(_MainTex, input.uv_MainTex - delta.xz).a, | |||
tex2D(_MainTex, input.uv_MainTex + delta.xz).a, | |||
tex2D(_MainTex, input.uv_MainTex - delta.zy).a, | |||
tex2D(_MainTex, input.uv_MainTex + delta.zy).a }; | |||
#endif | |||
#if USE_DERIVATIVE | |||
// Screen space scaling reciprocal with anisotropic correction | |||
float2 edgeNormal = Normalize(float2(smp4x.x - smp4x.y, smp4x.z - smp4x.w)); | |||
float2 res = float2(_TextureWidth * input.param.y, _TextureHeight); | |||
float2 tdx = ddx(input.uv_MainTex)*res; | |||
float2 tdy = ddy(input.uv_MainTex)*res; | |||
float lx = length(tdx); | |||
float ly = length(tdy); | |||
float s = sqrt(min(lx, ly) / max(lx, ly)); | |||
s = lerp(1, s, abs(dot(normalize(tdx + tdy), edgeNormal))); | |||
float scale = rsqrt(abs(tdx.x * tdy.y - tdx.y * tdy.x)) * (_GradientScale * 2) * s; | |||
#else | |||
float scale = input.param.y; | |||
#endif | |||
// Signed distance | |||
float c = tex2D(_MainTex, input.uv_MainTex).a; | |||
float sd = (.5 - c - input.param.x) * scale + .5; | |||
float outline = _OutlineWidth*_ScaleRatioA * scale; | |||
float softness = _OutlineSoftness*_ScaleRatioA * scale; | |||
// Color & Alpha | |||
float4 faceColor = _FaceColor; | |||
float4 outlineColor = _OutlineColor; | |||
faceColor *= input.color; | |||
outlineColor.a *= input.color.a; | |||
faceColor *= tex2D(_FaceTex, float2(input.uv2_FaceTex.x + _FaceUVSpeedX * _Time.y, input.uv2_FaceTex.y + _FaceUVSpeedY * _Time.y)); | |||
outlineColor *= tex2D(_OutlineTex, float2(input.uv2_OutlineTex.x + _OutlineUVSpeedX * _Time.y, input.uv2_OutlineTex.y + _OutlineUVSpeedY * _Time.y)); | |||
faceColor = GetColor(sd, faceColor, outlineColor, outline, softness); | |||
faceColor.rgb /= max(faceColor.a, 0.0001); | |||
#if BEVEL_ON | |||
// Face Normal | |||
float3 n = GetSurfaceNormal(smp4x, input.param.x); | |||
// Bumpmap | |||
float3 bump = UnpackNormal(tex2D(_BumpMap, input.uv2_FaceTex.xy)).xyz; | |||
bump *= lerp(_BumpFace, _BumpOutline, saturate(sd + outline * 0.5)); | |||
bump = lerp(float3(0, 0, 1), bump, faceColor.a); | |||
n = normalize(n - bump); | |||
// Cubemap reflection | |||
fixed4 reflcol = texCUBE(_Cube, reflect(input.viewDirEnv, mul((float3x3)unity_ObjectToWorld, n))); | |||
float3 emission = reflcol.rgb * lerp(_ReflectFaceColor.rgb, _ReflectOutlineColor.rgb, saturate(sd + outline * 0.5)) * faceColor.a; | |||
#else | |||
float3 n = float3(0, 0, -1); | |||
float3 emission = float3(0, 0, 0); | |||
#endif | |||
#if GLOW_ON | |||
float4 glowColor = GetGlowColor(sd, scale); | |||
glowColor.a *= input.color.a; | |||
emission += glowColor.rgb*glowColor.a; | |||
faceColor = BlendARGB(glowColor, faceColor); | |||
faceColor.rgb /= max(faceColor.a, 0.0001); | |||
#endif | |||
// Set Standard output structure | |||
o.Albedo = faceColor.rgb; | |||
o.Normal = -n; | |||
o.Emission = emission; | |||
o.Specular = lerp(_FaceShininess, _OutlineShininess, saturate(sd + outline * 0.5)); | |||
o.Gloss = 1; | |||
o.Alpha = faceColor.a; | |||
} |
@ -1,296 +0,0 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!21 &2103686 | |||
Material: | |||
serializedVersion: 6 | |||
m_ObjectHideFlags: 1 | |||
m_PrefabParentObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_Name: TextMeshPro/Sprite | |||
m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3} | |||
m_ShaderKeywords: UNITY_UI_CLIP_RECT | |||
m_LightmapFlags: 5 | |||
m_EnableInstancingVariants: 0 | |||
m_DoubleSidedGI: 0 | |||
m_CustomRenderQueue: -1 | |||
stringTagMap: {} | |||
disabledShaderPasses: [] | |||
m_SavedProperties: | |||
serializedVersion: 3 | |||
m_TexEnvs: | |||
- _MainTex: | |||
m_Texture: {fileID: 2800000, guid: dffef66376be4fa480fb02b19edbe903, type: 3} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
m_Floats: | |||
- _ColorMask: 15 | |||
- _Stencil: 0 | |||
- _StencilComp: 8 | |||
- _StencilOp: 0 | |||
- _StencilReadMask: 255 | |||
- _StencilWriteMask: 255 | |||
- _UseUIAlphaClip: 0 | |||
m_Colors: | |||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} | |||
- _Color: {r: 1, g: 1, b: 1, a: 1} | |||
--- !u!114 &11400000 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_PrefabParentObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 84a92b25f83d49b9bc132d206b370281, type: 3} | |||
m_Name: EmojiOne | |||
m_EditorClassIdentifier: | |||
hashCode: -1836805472 | |||
material: {fileID: 2103686} | |||
materialHashCode: 0 | |||
spriteSheet: {fileID: 2800000, guid: dffef66376be4fa480fb02b19edbe903, type: 3} | |||
spriteInfoList: | |||
- id: 0 | |||
x: 0 | |||
y: 384 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: Smiling face with smiling eyes | |||
hashCode: -1318250903 | |||
unicode: 128522 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 1 | |||
x: 128 | |||
y: 384 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f60b | |||
hashCode: 57188339 | |||
unicode: 128523 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 2 | |||
x: 256 | |||
y: 384 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f60d | |||
hashCode: 57188341 | |||
unicode: 128525 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 3 | |||
x: 384 | |||
y: 384 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f60e | |||
hashCode: 57188340 | |||
unicode: 128526 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 4 | |||
x: 0 | |||
y: 256 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: Grinning face | |||
hashCode: -95541379 | |||
unicode: 128512 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 5 | |||
x: 128 | |||
y: 256 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f601 | |||
hashCode: 57188256 | |||
unicode: 128513 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 6 | |||
x: 256 | |||
y: 256 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: Face with tears of joy | |||
hashCode: 239522663 | |||
unicode: 128514 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 7 | |||
x: 384 | |||
y: 256 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f603 | |||
hashCode: 57188258 | |||
unicode: 128515 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 8 | |||
x: 0 | |||
y: 128 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f604 | |||
hashCode: 57188261 | |||
unicode: 128516 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 9 | |||
x: 128 | |||
y: 128 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f605 | |||
hashCode: 57188260 | |||
unicode: 128517 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 10 | |||
x: 256 | |||
y: 128 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f606 | |||
hashCode: 57188263 | |||
unicode: 128518 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 11 | |||
x: 384 | |||
y: 128 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f609 | |||
hashCode: 57188264 | |||
unicode: 128521 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 12 | |||
x: 0 | |||
y: 0 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f618 | |||
hashCode: 57188168 | |||
unicode: 128536 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 13 | |||
x: 128 | |||
y: 0 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 1f923 | |||
hashCode: 57200239 | |||
unicode: 129315 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 14 | |||
x: 256 | |||
y: 0 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 263a | |||
hashCode: 1748406 | |||
unicode: 9786 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
- id: 15 | |||
x: 384 | |||
y: 0 | |||
width: 128 | |||
height: 128 | |||
xOffset: 0 | |||
yOffset: 115.6 | |||
xAdvance: 128 | |||
scale: 1 | |||
name: 2639 | |||
hashCode: 1748462 | |||
unicode: 9785 | |||
pivot: {x: 0.5, y: 0.5} | |||
sprite: {fileID: 0} | |||
fallbackSpriteAssets: [] | |||
--- !u!21 &1369835458 | |||
Material: | |||
serializedVersion: 6 | |||
m_ObjectHideFlags: 1 | |||
m_PrefabParentObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_Name: TextMeshPro/Sprite | |||
m_Shader: {fileID: 4800000, guid: cf81c85f95fe47e1a27f6ae460cf182c, type: 3} | |||
m_ShaderKeywords: | |||
m_LightmapFlags: 5 | |||
m_EnableInstancingVariants: 0 | |||
m_DoubleSidedGI: 0 | |||
m_CustomRenderQueue: -1 | |||
stringTagMap: {} | |||
disabledShaderPasses: [] | |||
m_SavedProperties: | |||
serializedVersion: 3 | |||
m_TexEnvs: [] | |||
m_Floats: [] | |||
m_Colors: [] |
@ -1,68 +0,0 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!114 &11400000 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_PrefabParentObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410, type: 3} | |||
m_Name: Default Style Sheet | |||
m_EditorClassIdentifier: | |||
m_StyleList: | |||
- m_Name: H1 | |||
m_HashCode: 2425 | |||
m_OpeningDefinition: <size=2em><b><#40ff80>* | |||
m_ClosingDefinition: '*</size></b></color>' | |||
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d00000032000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000660000006600000038000000300000003e0000002a000000 | |||
m_ClosingTagArray: 2a0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 | |||
- m_Name: Quote | |||
m_HashCode: 92254330 | |||
m_OpeningDefinition: <i><size=75%><margin=10%> | |||
m_ClosingDefinition: </i></size></width></margin> | |||
m_OpeningTagArray: 3c000000690000003e0000003c00000073000000690000007a000000650000003d0000003700000035000000250000003e0000003c0000006d000000610000007200000067000000690000006e0000003d0000003100000030000000250000003e000000 | |||
m_ClosingTagArray: 3c0000002f000000690000003e0000003c0000002f00000073000000690000007a000000650000003e0000003c0000002f00000077000000690000006400000074000000680000003e0000003c0000002f0000006d000000610000007200000067000000690000006e0000003e000000 | |||
- m_Name: Link | |||
m_HashCode: 2687968 | |||
m_OpeningDefinition: <u><#40a0ff><link="ID_01"> | |||
m_ClosingDefinition: </u></color></link> | |||
m_OpeningTagArray: 3c000000750000003e0000003c000000230000003400000030000000610000003000000066000000660000003e0000003c0000006c000000690000006e0000006b0000003d0000002200000049000000440000005f0000003000000031000000220000003e000000 | |||
m_ClosingTagArray: 3c0000002f000000750000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f0000006c000000690000006e0000006b0000003e000000 | |||
- m_Name: Title | |||
m_HashCode: 98732960 | |||
m_OpeningDefinition: <size=125%><b><align=center> | |||
m_ClosingDefinition: </size></b></align> | |||
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e0000003c000000620000003e0000003c000000610000006c00000069000000670000006e0000003d00000063000000650000006e0000007400000065000000720000003e000000 | |||
m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000610000006c00000069000000670000006e0000003e000000 | |||
- m_Name: H2 | |||
m_HashCode: 2426 | |||
m_OpeningDefinition: <size=1.5em><b><#4080FF> | |||
m_ClosingDefinition: </size></b></color> | |||
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e00000035000000650000006d0000003e0000003c000000620000003e0000003c000000230000003400000030000000380000003000000046000000460000003e000000 | |||
m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 | |||
- m_Name: H3 | |||
m_HashCode: 2427 | |||
m_OpeningDefinition: <size=1.17em><b><#FF8040> | |||
m_ClosingDefinition: </size></b></color> | |||
m_OpeningTagArray: 3c00000073000000690000007a000000650000003d000000310000002e0000003100000037000000650000006d0000003e0000003c000000620000003e0000003c000000230000004600000046000000380000003000000034000000300000003e000000 | |||
m_ClosingTagArray: 3c0000002f00000073000000690000007a000000650000003e0000003c0000002f000000620000003e0000003c0000002f000000630000006f0000006c0000006f000000720000003e000000 | |||
- m_Name: C1 | |||
m_HashCode: 2194 | |||
m_OpeningDefinition: <color=#ffff40> | |||
m_ClosingDefinition: </color> | |||
m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000660000006600000034000000300000003e000000 | |||
m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e000000 | |||
- m_Name: C2 | |||
m_HashCode: 2193 | |||
m_OpeningDefinition: <color=#ff40FF><size=125%> | |||
m_ClosingDefinition: </color></size> | |||
m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000006600000066000000340000003000000046000000460000003e0000003c00000073000000690000007a000000650000003d000000310000003200000035000000250000003e000000 | |||
m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f00000073000000690000007a000000650000003e000000 | |||
- m_Name: C3 | |||
m_HashCode: 2192 | |||
m_OpeningDefinition: <color=#80A0FF><b> | |||
m_ClosingDefinition: </color></b> | |||
m_OpeningTagArray: 3c000000630000006f0000006c0000006f000000720000003d000000230000003800000030000000410000003000000046000000460000003e0000003c000000620000003e000000 | |||
m_ClosingTagArray: 3c0000002f000000630000006f0000006c0000006f000000720000003e0000003c0000002f000000620000003e000000 |
@ -1,103 +0,0 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!114 &11400000 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 0 | |||
m_PrefabParentObject: {fileID: 0} | |||
m_PrefabInternal: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391, type: 3} | |||
m_Name: TMP Settings | |||
m_EditorClassIdentifier: | |||
m_enableWordWrapping: 1 | |||
m_enableKerning: 1 | |||
m_enableExtraPadding: 0 | |||
m_enableTintAllSprites: 0 | |||
m_enableParseEscapeCharacters: 1 | |||
m_missingGlyphCharacter: 0 | |||
m_warningsDisabled: 0 | |||
m_defaultFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} | |||
m_defaultFontAssetPath: Fonts & Materials/ | |||
m_defaultFontSize: 36 | |||
m_defaultAutoSizeMinRatio: 0.5 | |||
m_defaultAutoSizeMaxRatio: 2 | |||
m_defaultTextMeshProTextContainerSize: {x: 20, y: 5} | |||
m_defaultTextMeshProUITextContainerSize: {x: 200, y: 50} | |||
m_autoSizeTextContainer: 0 | |||
m_fallbackFontAssets: [] | |||
m_matchMaterialPreset: 1 | |||
m_defaultSpriteAsset: {fileID: 11400000, guid: c41005c129ba4d66911b75229fd70b45, | |||
type: 2} | |||
m_defaultSpriteAssetPath: Sprite Assets/ | |||
m_defaultColorGradientPresetsPath: Color Gradient Presets/ | |||
m_enableEmojiSupport: 1 | |||
m_defaultStyleSheet: {fileID: 11400000, guid: f952c082cb03451daed3ee968ac6c63e, | |||
type: 2} | |||
m_leadingCharacters: {fileID: 4900000, guid: d82c1b31c7e74239bff1220585707d2b, type: 3} | |||
m_followingCharacters: {fileID: 4900000, guid: fade42e8bc714b018fac513c043d323b, | |||
type: 3} | |||
m_FontCreatorRecentSettings: | |||
- sourceFontFileName: | |||
sourceFontFileGUID: edcaa01543603ae4cb6b2edf25967e21 | |||
pointSizeSamplingMode: 1 | |||
pointSize: 109 | |||
padding: 12 | |||
packingMode: 0 | |||
atlasWidth: 128 | |||
atlasHeight: 128 | |||
characterSetSelectionMode: 5 | |||
characterSequence: 64 | |||
fontStyle: 0 | |||
fontStyleModifier: 2 | |||
renderMode: 281 | |||
includeFontFeatures: 0 | |||
referenceFontAssetGUID: 903613a9fe4b65946aa20dfcce07abec | |||
- sourceFontFileName: | |||
sourceFontFileGUID: edcaa01543603ae4cb6b2edf25967e21 | |||
pointSizeSamplingMode: 0 | |||
pointSize: 108 | |||
padding: 12 | |||
packingMode: 0 | |||
atlasWidth: 128 | |||
atlasHeight: 128 | |||
characterSetSelectionMode: 5 | |||
characterSequence: 64 | |||
fontStyle: 0 | |||
fontStyleModifier: 2 | |||
renderMode: 2090 | |||
includeFontFeatures: 0 | |||
referenceFontAssetGUID: 70cf10c1d306ada42aa6cd7268db990d | |||
- sourceFontFileName: | |||
sourceFontFileGUID: edcaa01543603ae4cb6b2edf25967e21 | |||
pointSizeSamplingMode: 1 | |||
pointSize: 109 | |||
padding: 12 | |||
packingMode: 0 | |||
atlasWidth: 128 | |||
atlasHeight: 128 | |||
characterSetSelectionMode: 5 | |||
characterSequence: 64 | |||
fontStyle: 0 | |||
fontStyleModifier: 2 | |||
renderMode: 329 | |||
includeFontFeatures: 0 | |||
referenceFontAssetGUID: 396d465a5821ead47b589b228da7e980 | |||
- sourceFontFileName: | |||
sourceFontFileGUID: edcaa01543603ae4cb6b2edf25967e21 | |||
pointSizeSamplingMode: 1 | |||
pointSize: 338 | |||
padding: 36 | |||
packingMode: 0 | |||
atlasWidth: 4096 | |||
atlasHeight: 4096 | |||
characterSetSelectionMode: 1 | |||
characterSequence: 32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633 | |||
fontStyle: 0 | |||
fontStyleModifier: 2 | |||
renderMode: 329 | |||
includeFontFeatures: 0 | |||
referenceFontAssetGUID: 3a4171c252e1112499af739474d9f48e | |||
m_CreationSettingsSelectionIndex: 0 | |||
m_CreationSettingsIndex: 0 |
@ -1,3 +0,0 @@ | |||
This sample of beautiful emojis are provided by EmojiOne https://www.emojione.com/ | |||
Please visit their website to view the complete set of their emojis and review their licensing terms. |
@ -1,156 +0,0 @@ | |||
{"frames": [ | |||
{ | |||
"filename": "1f60a.png", | |||
"frame": {"x":0,"y":0,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f60b.png", | |||
"frame": {"x":128,"y":0,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f60d.png", | |||
"frame": {"x":256,"y":0,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f60e.png", | |||
"frame": {"x":384,"y":0,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f600.png", | |||
"frame": {"x":0,"y":128,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f601.png", | |||
"frame": {"x":128,"y":128,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f602.png", | |||
"frame": {"x":256,"y":128,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f603.png", | |||
"frame": {"x":384,"y":128,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f604.png", | |||
"frame": {"x":0,"y":256,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f605.png", | |||
"frame": {"x":128,"y":256,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f606.png", | |||
"frame": {"x":256,"y":256,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f609.png", | |||
"frame": {"x":384,"y":256,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f618.png", | |||
"frame": {"x":0,"y":384,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "1f923.png", | |||
"frame": {"x":128,"y":384,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "263a.png", | |||
"frame": {"x":256,"y":384,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}, | |||
{ | |||
"filename": "2639.png", | |||
"frame": {"x":384,"y":384,"w":128,"h":128}, | |||
"rotated": false, | |||
"trimmed": false, | |||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128}, | |||
"sourceSize": {"w":128,"h":128}, | |||
"pivot": {"x":0.5,"y":0.5} | |||
}], | |||
"meta": { | |||
"app": "http://www.codeandweb.com/texturepacker", | |||
"version": "1.0", | |||
"image": "EmojiOne.png", | |||
"format": "RGBA8888", | |||
"size": {"w":512,"h":512}, | |||
"scale": "1", | |||
"smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$" | |||
} | |||
} |
@ -1,20 +0,0 @@ | |||
| |||
Microsoft Visual Studio Solution File, Format Version 12.00 | |||
# Visual Studio 16 | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp-Editor", "Assembly-CSharp-Editor.csproj", "{7DDD3563-F4A1-02A1-0E20-80A847EE0B66}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Any CPU = Debug|Any CPU | |||
Release|Any CPU = Release|Any CPU | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{7DDD3563-F4A1-02A1-0E20-80A847EE0B66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{7DDD3563-F4A1-02A1-0E20-80A847EE0B66}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{7DDD3563-F4A1-02A1-0E20-80A847EE0B66}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{7DDD3563-F4A1-02A1-0E20-80A847EE0B66}.Release|Any CPU.Build.0 = Release|Any CPU | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
EndGlobal |
@ -1 +0,0 @@ | |||
5;0;4;0;0 |
@ -1,472 +0,0 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!114 &1 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_PixelRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 43 | |||
width: 2560 | |||
height: 1367 | |||
m_ShowMode: 4 | |||
m_Title: | |||
m_RootView: {fileID: 6} | |||
m_MinSize: {x: 950, y: 300} | |||
m_MaxSize: {x: 10000, y: 10000} | |||
--- !u!114 &2 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Children: | |||
- {fileID: 9} | |||
- {fileID: 3} | |||
m_Position: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 30 | |||
width: 2560 | |||
height: 1317 | |||
m_MinSize: {x: 509, y: 498} | |||
m_MaxSize: {x: 14004, y: 14048} | |||
vertical: 0 | |||
controlID: 81 | |||
--- !u!114 &3 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Children: [] | |||
m_Position: | |||
serializedVersion: 2 | |||
x: 1998 | |||
y: 0 | |||
width: 562 | |||
height: 1317 | |||
m_MinSize: {x: 277, y: 74} | |||
m_MaxSize: {x: 4002, y: 4024} | |||
m_ActualView: {fileID: 11} | |||
m_Panes: | |||
- {fileID: 11} | |||
m_Selected: 0 | |||
m_LastSelected: 0 | |||
--- !u!114 &4 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Children: [] | |||
m_Position: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 1998 | |||
height: 687 | |||
m_MinSize: {x: 202, y: 224} | |||
m_MaxSize: {x: 4002, y: 4024} | |||
m_ActualView: {fileID: 12} | |||
m_Panes: | |||
- {fileID: 12} | |||
m_Selected: 0 | |||
m_LastSelected: 0 | |||
--- !u!114 &5 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Children: [] | |||
m_Position: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 687 | |||
width: 1998 | |||
height: 630 | |||
m_MinSize: {x: 232, y: 274} | |||
m_MaxSize: {x: 10002, y: 10024} | |||
m_ActualView: {fileID: 10} | |||
m_Panes: | |||
- {fileID: 10} | |||
- {fileID: 13} | |||
m_Selected: 0 | |||
m_LastSelected: 1 | |||
--- !u!114 &6 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Children: | |||
- {fileID: 7} | |||
- {fileID: 2} | |||
- {fileID: 8} | |||
m_Position: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 2560 | |||
height: 1367 | |||
m_MinSize: {x: 950, y: 300} | |||
m_MaxSize: {x: 10000, y: 10000} | |||
--- !u!114 &7 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Children: [] | |||
m_Position: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 2560 | |||
height: 30 | |||
m_MinSize: {x: 0, y: 0} | |||
m_MaxSize: {x: 0, y: 0} | |||
m_LastLoadedLayoutName: | |||
--- !u!114 &8 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Children: [] | |||
m_Position: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 1347 | |||
width: 2560 | |||
height: 20 | |||
m_MinSize: {x: 0, y: 0} | |||
m_MaxSize: {x: 0, y: 0} | |||
--- !u!114 &9 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_Children: | |||
- {fileID: 4} | |||
- {fileID: 5} | |||
m_Position: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 1998 | |||
height: 1317 | |||
m_MinSize: {x: 232, y: 498} | |||
m_MaxSize: {x: 10002, y: 14048} | |||
vertical: 1 | |||
controlID: 3 | |||
--- !u!114 &10 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12014, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_MinSize: {x: 230, y: 250} | |||
m_MaxSize: {x: 10000, y: 10000} | |||
m_TitleContent: | |||
m_Text: Project | |||
m_Image: {fileID: -7501376956915960154, guid: 0000000000000000d000000000000000, | |||
type: 0} | |||
m_Tooltip: | |||
m_Pos: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 760 | |||
width: 1996 | |||
height: 610 | |||
m_PersistentViewDataDictionary: {fileID: 0} | |||
m_SearchFilter: | |||
m_NameFilter: | |||
m_ClassNames: [] | |||
m_AssetLabels: [] | |||
m_AssetBundleNames: [] | |||
m_VersionControlStates: [] | |||
m_SoftLockControlStates: [] | |||
m_ReferencingInstanceIDs: | |||
m_SceneHandles: | |||
m_ShowAllHits: 0 | |||
m_SearchArea: 1 | |||
m_Folders: | |||
- Assets/Consolas | |||
m_ViewMode: 1 | |||
m_StartGridSize: 96 | |||
m_LastFolders: | |||
- Assets/Consolas | |||
m_LastFoldersGridSize: 96 | |||
m_LastProjectPath: Z:\Users\aaron\Source\Repos\IPA-Reloaded-BeatSaber\BSIPA-ModList\TMP | |||
Exporter | |||
m_LockTracker: | |||
m_IsLocked: 0 | |||
m_FolderTreeState: | |||
scrollPos: {x: 0, y: 0} | |||
m_SelectedIDs: 1e0a0000 | |||
m_LastClickedID: 2590 | |||
m_ExpandedIDs: 0000000070090000be090000e60a00008e0b000000ca9a3b | |||
m_RenameOverlay: | |||
m_UserAcceptedRename: 0 | |||
m_Name: | |||
m_OriginalName: | |||
m_EditFieldRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 0 | |||
height: 0 | |||
m_UserData: 0 | |||
m_IsWaitingForDelay: 0 | |||
m_IsRenaming: 0 | |||
m_OriginalEventType: 11 | |||
m_IsRenamingFilename: 1 | |||
m_ClientGUIView: {fileID: 5} | |||
m_SearchString: | |||
m_CreateAssetUtility: | |||
m_EndAction: {fileID: 0} | |||
m_InstanceID: 0 | |||
m_Path: | |||
m_Icon: {fileID: 0} | |||
m_ResourceFile: | |||
m_AssetTreeState: | |||
scrollPos: {x: 0, y: 0} | |||
m_SelectedIDs: | |||
m_LastClickedID: 0 | |||
m_ExpandedIDs: 0000000070090000be090000e60a00008e0b0000 | |||
m_RenameOverlay: | |||
m_UserAcceptedRename: 0 | |||
m_Name: | |||
m_OriginalName: | |||
m_EditFieldRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 0 | |||
height: 0 | |||
m_UserData: 0 | |||
m_IsWaitingForDelay: 0 | |||
m_IsRenaming: 0 | |||
m_OriginalEventType: 11 | |||
m_IsRenamingFilename: 1 | |||
m_ClientGUIView: {fileID: 0} | |||
m_SearchString: | |||
m_CreateAssetUtility: | |||
m_EndAction: {fileID: 0} | |||
m_InstanceID: 0 | |||
m_Path: | |||
m_Icon: {fileID: 0} | |||
m_ResourceFile: | |||
m_ListAreaState: | |||
m_SelectedInstanceIDs: | |||
m_LastClickedInstanceID: 0 | |||
m_HadKeyboardFocusLastEvent: 1 | |||
m_ExpandedInstanceIDs: c6230000c60a00005a0b0000660b0000ce0a0000022f0000d00a0000eaeeffff | |||
m_RenameOverlay: | |||
m_UserAcceptedRename: 0 | |||
m_Name: | |||
m_OriginalName: | |||
m_EditFieldRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 0 | |||
height: 0 | |||
m_UserData: 0 | |||
m_IsWaitingForDelay: 0 | |||
m_IsRenaming: 0 | |||
m_OriginalEventType: 11 | |||
m_IsRenamingFilename: 1 | |||
m_ClientGUIView: {fileID: 5} | |||
m_CreateAssetUtility: | |||
m_EndAction: {fileID: 0} | |||
m_InstanceID: 0 | |||
m_Path: | |||
m_Icon: {fileID: 0} | |||
m_ResourceFile: | |||
m_NewAssetIndexInList: -1 | |||
m_ScrollPosition: {x: 0, y: 0} | |||
m_GridSize: 96 | |||
m_DirectoriesAreaWidth: 265 | |||
--- !u!114 &11 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_MinSize: {x: 275, y: 50} | |||
m_MaxSize: {x: 4000, y: 4000} | |||
m_TitleContent: | |||
m_Text: Inspector | |||
m_Image: {fileID: -6905738622615590433, guid: 0000000000000000d000000000000000, | |||
type: 0} | |||
m_Tooltip: | |||
m_Pos: | |||
serializedVersion: 2 | |||
x: 1998 | |||
y: 73 | |||
width: 560 | |||
height: 1297 | |||
m_PersistentViewDataDictionary: {fileID: 0} | |||
m_ObjectsLockedBeforeSerialization: [] | |||
m_InstanceIDsLockedBeforeSerialization: | |||
m_LockTracker: | |||
m_IsLocked: 0 | |||
m_PreviewResizer: | |||
m_CachedPref: 160 | |||
m_ControlHash: -371814159 | |||
m_PrefName: Preview_InspectorPreview | |||
m_PreviewWindow: {fileID: 0} | |||
--- !u!114 &12 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12061, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_MinSize: {x: 200, y: 200} | |||
m_MaxSize: {x: 4000, y: 4000} | |||
m_TitleContent: | |||
m_Text: Hierarchy | |||
m_Image: {fileID: -590624980919486359, guid: 0000000000000000d000000000000000, | |||
type: 0} | |||
m_Tooltip: | |||
m_Pos: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 73 | |||
width: 1996 | |||
height: 667 | |||
m_PersistentViewDataDictionary: {fileID: 0} | |||
m_SceneHierarchy: | |||
m_TreeViewState: | |||
scrollPos: {x: 0, y: 0} | |||
m_SelectedIDs: 240a0000 | |||
m_LastClickedID: 0 | |||
m_ExpandedIDs: befbffff | |||
m_RenameOverlay: | |||
m_UserAcceptedRename: 0 | |||
m_Name: | |||
m_OriginalName: | |||
m_EditFieldRect: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 0 | |||
width: 0 | |||
height: 0 | |||
m_UserData: 0 | |||
m_IsWaitingForDelay: 0 | |||
m_IsRenaming: 0 | |||
m_OriginalEventType: 11 | |||
m_IsRenamingFilename: 0 | |||
m_ClientGUIView: {fileID: 0} | |||
m_SearchString: | |||
m_ExpandedScenes: [] | |||
m_CurrenRootInstanceID: 0 | |||
m_LockTracker: | |||
m_IsLocked: 0 | |||
m_CurrentSortingName: TransformSorting | |||
m_WindowGUID: e647edac3ab8d534bb09eea7d6861473 | |||
--- !u!114 &13 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 52 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 1 | |||
m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
m_MinSize: {x: 100, y: 100} | |||
m_MaxSize: {x: 4000, y: 4000} | |||
m_TitleContent: | |||
m_Text: Console | |||
m_Image: {fileID: 111653112392082826, guid: 0000000000000000d000000000000000, | |||
type: 0} | |||
m_Tooltip: | |||
m_Pos: | |||
serializedVersion: 2 | |||
x: 0 | |||
y: 760 | |||
width: 1998 | |||
height: 611 | |||
m_PersistentViewDataDictionary: {fileID: 0} |
@ -1,4 +0,0 @@ | |||
sceneSetups: | |||
- path: Assets/Scenes/SampleScene.unity | |||
isLoaded: 1 | |||
isActive: 1 |
@ -1,2 +0,0 @@ | |||
unityRebuildLibraryVersion: 11 | |||
unityForwardCompatibleVersion: 40 |
@ -1,37 +0,0 @@ | |||
[1.0.1] | |||
Adding Readme file | |||
Adding local plugin importer callbacks. | |||
Removing Bintray references in package.json | |||
[2.0.3] | |||
Fix bug where importing the asset store ads package would cause duiplicate symbols, | |||
and removing the asset store ads package would cause missing symbols. | |||
[2.0.4] | |||
Added new description string to package.json | |||
Fixed art assets to use no compression (fixes issue switching between iOS and PC builds) | |||
[2.0.5] - 2018-03-29 | |||
Fix for https://fogbugz.unity3d.com/f/cases/1011363 | |||
Fixes an incorrect guid that the importer used to include/exclude the runtime assembly from the build. | |||
[2.0.6] - 2018-03-29 | |||
Update changelog for this and 2.0.5 | |||
[2.0.7] - 2018-04-06 | |||
Fix editor assembly project file to include the importer script. | |||
[2.0.8] - 2018-05-01 | |||
Add call to SetShouldOverridePredicate to exclude package dll when asset store dlls are present. | |||
Update unity version attribute to support 2017.4 LTS | |||
Fix an issue with the editor assembly to add back in some iOS platform specific code that was removed | |||
via conditionals (which is fine for source packages, but doesn't work with precompiled assemblies) |
@ -1,11 +0,0 @@ | |||
#import "UADSMetaData.h" | |||
@interface UADSInAppPurchaseMetaData : UADSMetaData | |||
- (void)setProductId:(NSString *)productId; | |||
- (void)setPrice:(NSNumber *)price; | |||
- (void)setCurrency:(NSString *)currency; | |||
- (void)setReceiptPurchaseData:(NSString *)receiptPurchaseData; | |||
- (void)setSignature:(NSString *)signature; | |||
@end |
@ -1,13 +0,0 @@ | |||
@interface UADSJsonStorage : NSObject | |||
@property (nonatomic, strong) NSMutableDictionary *storageContents; | |||
- (BOOL)set:(NSString *)key value:(id)value; | |||
- (id)getValueForKey:(NSString *)key; | |||
- (BOOL)deleteKey:(NSString *)key; | |||
- (NSArray *)getKeys:(NSString *)key recursive:(BOOL)recursive; | |||
- (void)clearData; | |||
- (BOOL)initData; | |||
- (BOOL)hasData; | |||
@end |
@ -1,9 +0,0 @@ | |||
#import "UADSMetaData.h" | |||
@interface UADSMediationMetaData : UADSMetaData | |||
- (void)setName:(NSString *)mediationNetworkName; | |||
- (void)setVersion:(NSString *)mediationSdkVersion; | |||
- (void)setOrdinal:(int)mediationOrdinal; | |||
@end |
@ -1,12 +0,0 @@ | |||
@interface UADSMetaData : NSObject | |||
@property (nonatomic, strong) NSString *category; | |||
@property (nonatomic, strong) NSMutableDictionary *entries; | |||
- (instancetype)initWithCategory:(NSString *)category; | |||
- (void)set:(NSString *)key value:(id)value; | |||
- (void)commit; | |||
@end |
@ -1,7 +0,0 @@ | |||
#import "UADSMetaData.h" | |||
@interface UADSPlayerMetaData : UADSMetaData | |||
- (void)setServerId:(NSString *)serverId; | |||
@end |
@ -1,255 +0,0 @@ | |||
#import <UIKit/UIKit.h> | |||
#import <UnityAds/UADSMediationMetaData.h> | |||
#import <UnityAds/UADSPlayerMetaData.h> | |||
/** | |||
* An enumerate that describes the state of `UnityAds` placements. | |||
* @note All placement states, other than `kUnityAdsPlacementStateReady`, indicate that the placement is not currently ready to show ads. | |||
*/ | |||
typedef NS_ENUM(NSInteger, UnityAdsPlacementState) { | |||
/** | |||
* A state that indicates that the placement is ready to show an ad. The `show:` selector can be called. | |||
*/ | |||
kUnityAdsPlacementStateReady, | |||
/** | |||
* A state that indicates that no state is information is available. | |||
* @warning This state can that UnityAds is not initialized or that the placement is not correctly configured in the Unity Ads admin tool. | |||
*/ | |||
kUnityAdsPlacementStateNotAvailable, | |||
/** | |||
* A state that indicates that the placement is currently disabled. The placement can be enabled in the Unity Ads admin tools. | |||
*/ | |||
kUnityAdsPlacementStateDisabled, | |||
/** | |||
* A state that indicates that the placement is not currently ready, but will be in the future. | |||
* @note This state most likely indicates that the ad content is currently caching. | |||
*/ | |||
kUnityAdsPlacementStateWaiting, | |||
/** | |||
* A state that indicates that the placement is properly configured, but there are currently no ads available for the placement. | |||
*/ | |||
kUnityAdsPlacementStateNoFill | |||
}; | |||
/** | |||
* An enumeration for the completion state of an ad. | |||
*/ | |||
typedef NS_ENUM(NSInteger, UnityAdsFinishState) { | |||
/** | |||
* A state that indicates that the ad did not successfully display. | |||
*/ | |||
kUnityAdsFinishStateError, | |||
/** | |||
* A state that indicates that the user skipped the ad. | |||
*/ | |||
kUnityAdsFinishStateSkipped, | |||
/** | |||
* A state that indicates that the ad was played entirely. | |||
*/ | |||
kUnityAdsFinishStateCompleted | |||
}; | |||
/** | |||
* An enumeration for the various errors that can be emitted through the `UnityAdsDelegate` `unityAdsDidError:withMessage:` method. | |||
*/ | |||
typedef NS_ENUM(NSInteger, UnityAdsError) { | |||
/** | |||
* An error that indicates failure due to `UnityAds` currently being uninitialized. | |||
*/ | |||
kUnityAdsErrorNotInitialized = 0, | |||
/** | |||
* An error that indicates failure due to a failure in the initialization process. | |||
*/ | |||
kUnityAdsErrorInitializedFailed, | |||
/** | |||
* An error that indicates failure due to attempting to initialize `UnityAds` with invalid parameters. | |||
*/ | |||
kUnityAdsErrorInvalidArgument, | |||
/** | |||
* An error that indicates failure of the video player. | |||
*/ | |||
kUnityAdsErrorVideoPlayerError, | |||
/** | |||
* An error that indicates failure due to having attempted to initialize the `UnityAds` class in an invalid environment. | |||
*/ | |||
kUnityAdsErrorInitSanityCheckFail, | |||
/** | |||
* An error that indicates failure due to the presence of an ad blocker. | |||
*/ | |||
kUnityAdsErrorAdBlockerDetected, | |||
/** | |||
* An error that indicates failure due to inability to read or write a file. | |||
*/ | |||
kUnityAdsErrorFileIoError, | |||
/** | |||
* An error that indicates failure due to a bad device identifier. | |||
*/ | |||
kUnityAdsErrorDeviceIdError, | |||
/** | |||
* An error that indicates a failure when attempting to show an ad. | |||
*/ | |||
kUnityAdsErrorShowError, | |||
/** | |||
* An error that indicates an internal failure in `UnityAds`. | |||
*/ | |||
kUnityAdsErrorInternalError, | |||
}; | |||
/** | |||
* The `UnityAdsDelegate` protocol defines the required methods for receiving messages from UnityAds. | |||
* Must be implemented by the hosting app. | |||
* The unityAdsReady: method is called when it's possible to show an ad. | |||
* All other methods are used to provide notifications of events of the ad lifecycle. | |||
* @note On initialization, there are ready (or error) callbacks for each placement attached to the game identifier. | |||
*/ | |||
NS_ASSUME_NONNULL_BEGIN | |||
@protocol UnityAdsDelegate <NSObject> | |||
/** | |||
* Called when `UnityAds` is ready to show an ad. After this callback you can call the `UnityAds` `show:` method for this placement. | |||
* Note that sometimes placement might no longer be ready due to exceptional reasons. These situations will give no new callbacks. | |||
* | |||
* @warning To avoid error situations, it is always best to check `isReady` method status before calling show. | |||
* @param placementId The ID of the placement that is ready to show, as defined in Unity Ads admin tools. | |||
*/ | |||
- (void)unityAdsReady:(NSString *)placementId; | |||
/** | |||
* Called when `UnityAds` encounters an error. All errors will be logged but this method can be used as an additional debugging aid. This callback can also be used for collecting statistics from different error scenarios. | |||
* | |||
* @param error A `UnityAdsError` error enum value indicating the type of error encountered. | |||
* @param message A human readable string indicating the type of error encountered. | |||
*/ | |||
- (void)unityAdsDidError:(UnityAdsError)error withMessage:(NSString *)message; | |||
/** | |||
* Called on a successful start of advertisement after calling the `UnityAds` `show:` method. | |||
* | |||
* @warning If there are errors in starting the advertisement, this method may never be called. Unity Ads will directly call `unityAdsDidFinish:withFinishState:` with error status. | |||
* | |||
* @param placementId The ID of the placement that has started, as defined in Unity Ads admin tools. | |||
*/ | |||
- (void)unityAdsDidStart:(NSString *)placementId; | |||
/** | |||
* Called after the ad has closed. | |||
* | |||
* @param placementId The ID of the placement that has finished, as defined in Unity Ads admin tools. | |||
* @param state An enum value indicating the finish state of the ad. Possible values are `Completed`, `Skipped`, and `Error`. | |||
*/ | |||
- (void)unityAdsDidFinish:(NSString *)placementId | |||
withFinishState:(UnityAdsFinishState)state; | |||
@end | |||
/** | |||
* `UnityAds` is a static class with methods for preparing and showing ads. | |||
* | |||
* @warning In order to ensure expected behaviour, the delegate must always be set. | |||
*/ | |||
@interface UnityAds : NSObject | |||
- (instancetype)init NS_UNAVAILABLE; | |||
+ (instancetype)initialize NS_UNAVAILABLE; | |||
/** | |||
* Initializes UnityAds. UnityAds should be initialized when app starts. | |||
* | |||
* @param gameId Unique identifier for a game, given by Unity Ads admin tools or Unity editor. | |||
* @param delegate delegate for UnityAdsDelegate callbacks | |||
*/ | |||
+ (void)initialize:(NSString *)gameId | |||
delegate:(nullable id<UnityAdsDelegate>)delegate; | |||
/** | |||
* Initializes UnityAds. UnityAds should be initialized when app starts. | |||
* | |||
* @param gameId Unique identifier for a game, given by Unity Ads admin tools or Unity editor. | |||
* @param delegate delegate for UnityAdsDelegate callbacks | |||
* @param testMode Set this flag to `YES` to indicate test mode and show only test ads. | |||
*/ | |||
+ (void)initialize:(NSString *)gameId | |||
delegate:(nullable id<UnityAdsDelegate>)delegate | |||
testMode:(BOOL)testMode; | |||
/** | |||
* Show an ad using the defaul placement. | |||
* | |||
* @param viewController The `UIViewController` that is to present the ad view controller. | |||
*/ | |||
+ (void)show:(UIViewController *)viewController; | |||
/** | |||
* Show an ad using the provided placement ID. | |||
* | |||
* @param viewController The `UIViewController` that is to present the ad view controller. | |||
* @param placementId The placement ID, as defined in Unity Ads admin tools. | |||
*/ | |||
+ (void)show:(UIViewController *)viewController placementId:(NSString *)placementId; | |||
/** | |||
* Provides the currently assigned `UnityAdsDelegate`. | |||
* | |||
* @return The current `UnityAdsDelegate`. | |||
*/ | |||
+ (id<UnityAdsDelegate>)getDelegate; | |||
/** | |||
* Allows the delegate to be reassigned after UnityAds has already been initialized. | |||
* | |||
* @param delegate The new `UnityAdsDelegate' for UnityAds to send callbacks to. | |||
*/ | |||
+ (void)setDelegate:(id<UnityAdsDelegate>)delegate; | |||
/** | |||
* Get the current debug status of `UnityAds`. | |||
* | |||
* @return If `YES`, `UnityAds` will provide verbose logs. | |||
*/ | |||
+ (BOOL)getDebugMode; | |||
/** | |||
* Set the logging verbosity of `UnityAds`. Debug mode indicates verbose logging. | |||
* @warning Does not relate to test mode for ad content. | |||
* @param enableDebugMode `YES` for verbose logging. | |||
*/ | |||
+ (void)setDebugMode:(BOOL)enableDebugMode; | |||
/** | |||
* Check to see if the current device supports using Unity Ads. | |||
* | |||
* @return If `NO`, the current device cannot initialize `UnityAds` or show ads. | |||
*/ | |||
+ (BOOL)isSupported; | |||
/** | |||
* Check if the default placement is ready to show an ad. | |||
* | |||
* @return If `YES`, the default placement is ready to show an ad. | |||
*/ | |||
+ (BOOL)isReady; | |||
/** | |||
* Check if a particular placement is ready to show an ad. | |||
* | |||
* @param placementId The placement ID being checked. | |||
* | |||
* @return If `YES`, the placement is ready to show an ad. | |||
*/ | |||
+ (BOOL)isReady:(NSString *)placementId; | |||
/** | |||
* Check the current state of the default placement. | |||
* | |||
* @return If this is `kUnityAdsPlacementStateReady`, the placement is ready to show ads. Other states represent errors. | |||
*/ | |||
+ (UnityAdsPlacementState)getPlacementState; | |||
/** | |||
* Check the current state of a placement. | |||
* | |||
* @param placementId The placement ID, as defined in Unity Ads admin tools. | |||
* | |||
* @return If this is `kUnityAdsPlacementStateReady`, the placement is ready to show ads. Other states represent errors. | |||
*/ | |||
+ (UnityAdsPlacementState)getPlacementState:(NSString *)placementId; | |||
/** | |||
* Check the version of this `UnityAds` SDK | |||
* | |||
* @return String representing the current version name. | |||
*/ | |||
+ (NSString *)getVersion; | |||
/** | |||
* Check that `UnityAds` has been initialized. This might be useful for debugging initialization problems. | |||
* | |||
* @return If `YES`, Unity Ads has been successfully initialized. | |||
*/ | |||
+ (BOOL)isInitialized; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@ -1,21 +0,0 @@ | |||
#import "UnityAds.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@protocol UnityAdsExtendedDelegate <UnityAdsDelegate> | |||
/** | |||
* Called when a click event happens. | |||
* | |||
* @param placementId The ID of the placement that was clicked. | |||
*/ | |||
- (void)unityAdsDidClick:(NSString *)placementId; | |||
/** | |||
* Called when a placement changes state. | |||
* | |||
* @param placementId The ID of the placement that changed state. | |||
* @param oldState The state before the change. | |||
* @param newState The state after the change. | |||
*/ | |||
- (void)unityAdsPlacementStateChanged:(NSString *)placementId oldState:(UnityAdsPlacementState)oldState newState:(UnityAdsPlacementState)newState; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@ -1,11 +0,0 @@ | |||
#import "UnityAds.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@protocol UnityAdsUnityDelegate <UnityAdsDelegate> | |||
/** | |||
* Called when an in-app purchase is initiated from an ad. | |||
* | |||
* @param eventString The string provided via the ad. | |||
*/ | |||
- (void)unityAdsDidInitiatePurchase:(NSString *)eventString; | |||
@end | |||
NS_ASSUME_NONNULL_END |