mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Initial commit
This commit is contained in:
commit
3c7cc0c973
8391 changed files with 704313 additions and 0 deletions
|
@ -0,0 +1,6 @@
|
|||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("Unity.2D.Animation.Editor")]
|
||||
[assembly: InternalsVisibleTo("Unity.2D.SpriteShape.Editor")]
|
||||
[assembly: InternalsVisibleTo("Unity.2D.SpriteShape.EditorTests")]
|
||||
[assembly: InternalsVisibleTo("Unity.2D.PsdImporter.Editor")]
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7fc947ed5e1e2b141bd741eca43b418c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "Unity.InternalAPIEditorBridge.001",
|
||||
"references": [
|
||||
"Unity.2D.Sprite.Editor"
|
||||
],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": []
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ce6baade223984afda3f24c7fca12584
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,106 @@
|
|||
using System;
|
||||
using System.Reflection;
|
||||
using UnityEditor.ShortcutManagement;
|
||||
using UnityEditor.U2D.Sprites;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace UnityEditor.U2D.Common
|
||||
{
|
||||
internal static class InternalEditorBridge
|
||||
{
|
||||
public static void RenderSortingLayerFields(SerializedProperty order, SerializedProperty layer)
|
||||
{
|
||||
SortingLayerEditorUtility.RenderSortingLayerFields(order, layer);
|
||||
}
|
||||
|
||||
public static void RepaintImmediately(EditorWindow window)
|
||||
{
|
||||
window.RepaintImmediately();
|
||||
}
|
||||
|
||||
public static ISpriteEditorDataProvider GetISpriteEditorDataProviderFromPath(string importedAsset)
|
||||
{
|
||||
return AssetImporter.GetAtPath(importedAsset) as ISpriteEditorDataProvider;
|
||||
}
|
||||
|
||||
public static void GenerateOutline(Texture2D texture, Rect rect, float detail, byte alphaTolerance, bool holeDetection, out Vector2[][] paths)
|
||||
{
|
||||
UnityEditor.Sprites.SpriteUtility.GenerateOutline(texture, rect, detail, alphaTolerance, holeDetection, out paths);
|
||||
}
|
||||
|
||||
public static bool DoesHardwareSupportsFullNPOT()
|
||||
{
|
||||
return ShaderUtil.hardwareSupportsFullNPOT;
|
||||
}
|
||||
|
||||
public static Texture2D CreateTemporaryDuplicate(Texture2D tex, int width, int height)
|
||||
{
|
||||
return UnityEditor.SpriteUtility.CreateTemporaryDuplicate(tex, width, height);
|
||||
}
|
||||
|
||||
public static void ShowSpriteEditorWindow()
|
||||
{
|
||||
SpriteUtilityWindow.ShowSpriteEditorWindow();
|
||||
}
|
||||
|
||||
public static void ApplyWireMaterial()
|
||||
{
|
||||
HandleUtility.ApplyWireMaterial();
|
||||
}
|
||||
|
||||
public static void ResetSpriteEditorView(ISpriteEditor spriteEditor)
|
||||
{
|
||||
if (spriteEditor != null)
|
||||
{
|
||||
Type t = spriteEditor.GetType();
|
||||
var zoom = t.GetField("m_Zoom", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
if (zoom != null)
|
||||
{
|
||||
zoom.SetValue(spriteEditor, -1);
|
||||
}
|
||||
|
||||
var scrollPosition = t.GetField("m_ScrollPosition", BindingFlags.Instance | BindingFlags.NonPublic);
|
||||
if (scrollPosition != null)
|
||||
{
|
||||
scrollPosition.SetValue(spriteEditor, new Vector2());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ShortcutContext : IShortcutToolContext
|
||||
{
|
||||
public Func<bool> isActive;
|
||||
public bool active
|
||||
{
|
||||
get
|
||||
{
|
||||
if (isActive != null)
|
||||
return isActive();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public object context { get; set; }
|
||||
}
|
||||
|
||||
public static void RegisterShortcutContext(ShortcutContext context)
|
||||
{
|
||||
ShortcutIntegration.instance.contextManager.RegisterToolContext(context);
|
||||
}
|
||||
|
||||
public static void UnregisterShortcutContext(ShortcutContext context)
|
||||
{
|
||||
ShortcutIntegration.instance.contextManager.DeregisterToolContext(context);
|
||||
}
|
||||
|
||||
public static void AddEditorApplicationProjectLoadedCallback(UnityAction callback)
|
||||
{
|
||||
EditorApplication.projectWasLoaded += callback;
|
||||
}
|
||||
|
||||
public static void RemoveEditorApplicationProjectLoadedCallback(UnityAction callback)
|
||||
{
|
||||
EditorApplication.projectWasLoaded -= callback;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b410f2c9e86a44d35992f15c05361b29
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue