testss
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: InternalsVisibleTo("Unity.ShaderGraph.Editor")]
|
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
static class EnumInfo<T> where T : Enum
|
||||
{
|
||||
public static T[] values;
|
||||
|
||||
static EnumInfo()
|
||||
{
|
||||
values = (T[])Enum.GetValues(typeof(T));
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface, Inherited = true, AllowMultiple = false)]
|
||||
internal class GenerationAPIAttribute : Attribute
|
||||
{
|
||||
public GenerationAPIAttribute() {}
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
static class StringBuilderExtensions
|
||||
{
|
||||
public static void AppendIndentedLines(this StringBuilder sb, string lines, string indentation)
|
||||
{
|
||||
sb.EnsureCapacity(sb.Length + lines.Length);
|
||||
var charIndex = 0;
|
||||
while (charIndex < lines.Length)
|
||||
{
|
||||
var nextNewLineIndex = lines.IndexOf(Environment.NewLine, charIndex, StringComparison.Ordinal);
|
||||
if (nextNewLineIndex == -1)
|
||||
{
|
||||
nextNewLineIndex = lines.Length;
|
||||
}
|
||||
|
||||
sb.Append(indentation);
|
||||
|
||||
for (var i = charIndex; i < nextNewLineIndex; i++)
|
||||
{
|
||||
sb.Append(lines[i]);
|
||||
}
|
||||
|
||||
sb.AppendLine();
|
||||
|
||||
charIndex = nextNewLineIndex + Environment.NewLine.Length;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "Unity.ShaderGraph.Utilities",
|
||||
"references": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": false,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": []
|
||||
}
|
Reference in New Issue
Block a user