Firstborn/Library/PackageCache/com.unity.shadergraph@12.1.8/Editor/Generation/SubTarget.cs
Schaken-Mods b486678290 Library -Artifacts
Library -Artifacts
2023-03-28 12:24:16 -05:00

39 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEditor.ShaderGraph.Serialization;
namespace UnityEditor.ShaderGraph
{
[Serializable, GenerationAPI] // TODO: Public
internal abstract class SubTarget : JsonObject
{
internal abstract Type targetType { get; }
internal Target target { get; set; }
public string displayName { get; set; }
public bool isHidden { get; set; }
public abstract bool IsActive();
public abstract void Setup(ref TargetSetupContext context);
public abstract void GetFields(ref TargetFieldContext context);
public abstract void GetActiveBlocks(ref TargetActiveBlockContext context);
public abstract void GetPropertiesGUI(ref TargetPropertyGUIContext context, Action onChange, Action<String> registerUndo);
public virtual void CollectShaderProperties(PropertyCollector collector, GenerationMode generationMode) { }
public virtual void ProcessPreviewMaterial(Material material) { }
public virtual object saveContext => null;
}
[GenerationAPI] // TODO: Public
internal abstract class SubTarget<T> : SubTarget where T : Target
{
internal override Type targetType => typeof(T);
public new T target
{
get => base.target as T;
set => base.target = value;
}
}
}