initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "All")]
|
||||
class AllNode : CodeFunctionNode
|
||||
{
|
||||
public AllNode()
|
||||
{
|
||||
name = "All";
|
||||
}
|
||||
|
||||
public override bool hasPreview
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_All", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_All(
|
||||
[Slot(0, Binding.None)] DynamicDimensionVector In,
|
||||
[Slot(1, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = all(In);
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: aa03a542537ab4fb4a01a004efa97f58
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,37 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "And")]
|
||||
class AndNode : CodeFunctionNode
|
||||
{
|
||||
public AndNode()
|
||||
{
|
||||
name = "And";
|
||||
}
|
||||
|
||||
public override bool hasPreview
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_And", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_And(
|
||||
[Slot(0, Binding.None)] Boolean A,
|
||||
[Slot(1, Binding.None)] Boolean B,
|
||||
[Slot(2, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = A && B;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 34929a6d0bb40407fb00206ab0a10fa1
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "Any")]
|
||||
class AnyNode : CodeFunctionNode
|
||||
{
|
||||
public AnyNode()
|
||||
{
|
||||
name = "Any";
|
||||
}
|
||||
|
||||
public override bool hasPreview
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Any", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Any(
|
||||
[Slot(0, Binding.None)] DynamicDimensionVector In,
|
||||
[Slot(1, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = any(In);
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f3d072ddeeee848848f2e59dbb5cf1d9
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,34 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "Branch")]
|
||||
class BranchNode : CodeFunctionNode
|
||||
{
|
||||
public BranchNode()
|
||||
{
|
||||
name = "Branch";
|
||||
synonyms = new string[] { "switch", "if", "else" };
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Branch", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Branch(
|
||||
[Slot(0, Binding.None)] Boolean Predicate,
|
||||
[Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector True,
|
||||
[Slot(2, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector False,
|
||||
[Slot(3, Binding.None)] out DynamicDimensionVector Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = Predicate ? True : False;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 15ad3dc0ff22d7748af5e82ef5503d32
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using UnityEditor.Graphing;
|
||||
using UnityEditor.Rendering;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Serializable]
|
||||
[Title("Utility", "Logic", "Branch On Input Connection")]
|
||||
class BranchOnInputConnectionNode : AbstractMaterialNode, IGeneratesBodyCode
|
||||
{
|
||||
public const int InputSlotId = 0;
|
||||
public const int ConnectedSlotId = 1;
|
||||
public const int NotConnectedSlotId = 2;
|
||||
public const int OutSlotId = 3;
|
||||
|
||||
const string kInputSlotName = "Input";
|
||||
const string kConnectedSlotName = "Connected";
|
||||
const string kNotConnectedSlotName = "NotConnected";
|
||||
const string kOutSlotName = "Out";
|
||||
|
||||
public BranchOnInputConnectionNode()
|
||||
{
|
||||
name = "Branch On Input Connection";
|
||||
UpdateNodeAfterDeserialization();
|
||||
}
|
||||
|
||||
public sealed override void UpdateNodeAfterDeserialization()
|
||||
{
|
||||
AddSlot(new PropertyConnectionStateMaterialSlot(InputSlotId, kInputSlotName, kInputSlotName, Graphing.SlotType.Input));
|
||||
AddSlot(new DynamicVectorMaterialSlot(ConnectedSlotId, kConnectedSlotName, kConnectedSlotName, Graphing.SlotType.Input, UnityEngine.Vector4.one));
|
||||
AddSlot(new DynamicVectorMaterialSlot(NotConnectedSlotId, kNotConnectedSlotName, kNotConnectedSlotName, Graphing.SlotType.Input, UnityEngine.Vector4.zero));
|
||||
AddSlot(new DynamicVectorMaterialSlot(OutSlotId, kOutSlotName, kOutSlotName, Graphing.SlotType.Output, UnityEngine.Vector4.zero));
|
||||
RemoveSlotsNameNotMatching(new[] { InputSlotId, ConnectedSlotId, NotConnectedSlotId, OutSlotId });
|
||||
}
|
||||
|
||||
public override bool allowedInMainGraph => false;
|
||||
public override bool hasPreview => true;
|
||||
|
||||
public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode)
|
||||
{
|
||||
// inspect one of the dynamic slots to figure out what type we are actually using
|
||||
var dynSlot = this.FindInputSlot<DynamicVectorMaterialSlot>(ConnectedSlotId);
|
||||
string dynamicDimension = NodeUtils.GetSlotDimension(dynSlot.concreteValueType);
|
||||
var dynamicType = "$precision" + dynamicDimension;
|
||||
|
||||
// declare output variable
|
||||
var input = GetSlotValue(InputSlotId, generationMode);
|
||||
var connected = GetSlotValue(ConnectedSlotId, generationMode);
|
||||
var notconnected = GetSlotValue(NotConnectedSlotId, generationMode);
|
||||
var output = GetVariableNameForSlot(OutSlotId);
|
||||
|
||||
if (generationMode == GenerationMode.Preview)
|
||||
sb.AppendLine($"{dynamicType} {output} = {notconnected};");
|
||||
else
|
||||
sb.AppendLine($"{dynamicType} {output} = {input} ? {connected} : {notconnected};");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: be7845eb62257564492a5c3ba1d0d181
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,146 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
using UnityEditor.Graphing;
|
||||
using UnityEditor.ShaderGraph.Drawing.Controls;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
enum ComparisonType
|
||||
{
|
||||
Equal,
|
||||
NotEqual,
|
||||
Less,
|
||||
LessOrEqual,
|
||||
Greater,
|
||||
GreaterOrEqual
|
||||
};
|
||||
|
||||
[Title("Utility", "Logic", "Comparison")]
|
||||
class ComparisonNode : CodeFunctionNode
|
||||
{
|
||||
public ComparisonNode()
|
||||
{
|
||||
name = "Comparison";
|
||||
synonyms = new string[] { "equal", "greater than", "less than" };
|
||||
}
|
||||
|
||||
[SerializeField]
|
||||
private ComparisonType m_ComparisonType = ComparisonType.Equal;
|
||||
|
||||
[EnumControl("")]
|
||||
public ComparisonType comparisonType
|
||||
{
|
||||
get { return m_ComparisonType; }
|
||||
set
|
||||
{
|
||||
if (m_ComparisonType == value)
|
||||
return;
|
||||
|
||||
m_ComparisonType = value;
|
||||
Dirty(ModificationScope.Graph);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool hasPreview
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
switch (comparisonType)
|
||||
{
|
||||
case ComparisonType.NotEqual:
|
||||
return GetType().GetMethod("Unity_Comparison_NotEqual", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
case ComparisonType.Less:
|
||||
return GetType().GetMethod("Unity_Comparison_Less", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
case ComparisonType.LessOrEqual:
|
||||
return GetType().GetMethod("Unity_Comparison_LessOrEqual", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
case ComparisonType.Greater:
|
||||
return GetType().GetMethod("Unity_Comparison_Greater", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
case ComparisonType.GreaterOrEqual:
|
||||
return GetType().GetMethod("Unity_Comparison_GreaterOrEqual", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
default:
|
||||
return GetType().GetMethod("Unity_Comparison_Equal", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
}
|
||||
|
||||
static string Unity_Comparison_Equal(
|
||||
[Slot(0, Binding.None)] Vector1 A,
|
||||
[Slot(1, Binding.None)] Vector1 B,
|
||||
[Slot(2, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = A == B ? 1 : 0;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
static string Unity_Comparison_NotEqual(
|
||||
[Slot(0, Binding.None)] Vector1 A,
|
||||
[Slot(1, Binding.None)] Vector1 B,
|
||||
[Slot(2, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = A != B ? 1 : 0;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
static string Unity_Comparison_Less(
|
||||
[Slot(0, Binding.None)] Vector1 A,
|
||||
[Slot(1, Binding.None)] Vector1 B,
|
||||
[Slot(2, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = A < B ? 1 : 0;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
static string Unity_Comparison_LessOrEqual(
|
||||
[Slot(0, Binding.None)] Vector1 A,
|
||||
[Slot(1, Binding.None)] Vector1 B,
|
||||
[Slot(2, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = A <= B ? 1 : 0;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
static string Unity_Comparison_Greater(
|
||||
[Slot(0, Binding.None)] Vector1 A,
|
||||
[Slot(1, Binding.None)] Vector1 B,
|
||||
[Slot(2, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = A > B ? 1 : 0;
|
||||
}
|
||||
";
|
||||
}
|
||||
|
||||
static string Unity_Comparison_GreaterOrEqual(
|
||||
[Slot(0, Binding.None)] Vector1 A,
|
||||
[Slot(1, Binding.None)] Vector1 B,
|
||||
[Slot(2, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = A >= B ? 1 : 0;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c66cc68d0d0862b4c8ddfc00093d0ae0
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,37 @@
|
|||
using UnityEngine;
|
||||
using UnityEditor.Graphing;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "Is Front Face")]
|
||||
class IsFrontFaceNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireFaceSign
|
||||
{
|
||||
public IsFrontFaceNode()
|
||||
{
|
||||
name = "Is Front Face";
|
||||
synonyms = new string[] { "face", "side" };
|
||||
UpdateNodeAfterDeserialization();
|
||||
}
|
||||
|
||||
public override bool hasPreview { get { return false; } }
|
||||
|
||||
public const int OutputSlotId = 0;
|
||||
private const string kOutputSlotName = "Out";
|
||||
|
||||
public override void UpdateNodeAfterDeserialization()
|
||||
{
|
||||
AddSlot(new BooleanMaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, true, ShaderStageCapability.Fragment));
|
||||
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
|
||||
}
|
||||
|
||||
public void GenerateNodeCode(ShaderStringBuilder sb, GenerationMode generationMode)
|
||||
{
|
||||
sb.AppendLine(string.Format("$precision {0} = max(0, IN.{1}.x);", GetVariableNameForSlot(OutputSlotId), ShaderGeneratorNames.FaceSign));
|
||||
}
|
||||
|
||||
public bool RequiresFaceSign(ShaderStageCapability stageCapability = ShaderStageCapability.Fragment)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c7e3dd61523f54e52ade29765e299d3f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "Is Infinite")]
|
||||
class IsInfiniteNode : CodeFunctionNode
|
||||
{
|
||||
public IsInfiniteNode()
|
||||
{
|
||||
name = "Is Infinite";
|
||||
}
|
||||
|
||||
public override bool hasPreview
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_IsInfinite", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_IsInfinite(
|
||||
[Slot(0, Binding.None)] Vector1 In,
|
||||
[Slot(1, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = isinf(In);
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6eaf1bad910084b85ac9ead4319c7820
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "Is NaN")]
|
||||
class IsNanNode : CodeFunctionNode
|
||||
{
|
||||
public IsNanNode()
|
||||
{
|
||||
name = "Is NaN";
|
||||
}
|
||||
|
||||
public override bool hasPreview
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_IsNaN", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_IsNaN(
|
||||
[Slot(0, Binding.None)] Vector1 In,
|
||||
[Slot(1, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = isnan(In) ? 1 : 0;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0e15b8359c9db4d0ea27f4deab94137e
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,37 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "Nand")]
|
||||
class NandNode : CodeFunctionNode
|
||||
{
|
||||
public NandNode()
|
||||
{
|
||||
name = "Nand";
|
||||
}
|
||||
|
||||
public override bool hasPreview
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Nand", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Nand(
|
||||
[Slot(0, Binding.None)] Boolean A,
|
||||
[Slot(1, Binding.None)] Boolean B,
|
||||
[Slot(2, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = !A && !B;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4defde87a9d5e44d8b8900d3f8ef6440
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "Not")]
|
||||
class NotNode : CodeFunctionNode
|
||||
{
|
||||
public NotNode()
|
||||
{
|
||||
name = "Not";
|
||||
}
|
||||
|
||||
public override bool hasPreview
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Not", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Not(
|
||||
[Slot(0, Binding.None)] Boolean In,
|
||||
[Slot(1, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = !In;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: acb4138f9cef644dfa59102e871d1820
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,37 @@
|
|||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
[Title("Utility", "Logic", "Or")]
|
||||
class OrNode : CodeFunctionNode
|
||||
{
|
||||
public OrNode()
|
||||
{
|
||||
name = "Or";
|
||||
}
|
||||
|
||||
public override bool hasPreview
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
protected override MethodInfo GetFunctionToConvert()
|
||||
{
|
||||
return GetType().GetMethod("Unity_Or", BindingFlags.Static | BindingFlags.NonPublic);
|
||||
}
|
||||
|
||||
static string Unity_Or(
|
||||
[Slot(0, Binding.None)] Boolean A,
|
||||
[Slot(1, Binding.None)] Boolean B,
|
||||
[Slot(2, Binding.None)] out Boolean Out)
|
||||
{
|
||||
return
|
||||
@"
|
||||
{
|
||||
Out = A || B;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0f6f860c0f1e24214b5d2974cc624227
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
Loading…
Add table
Add a link
Reference in a new issue