Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Editable Input Fields Added shader graph kinda serializefield support. Added an example node. * renamed few things and fixed a value not reseted but Co-authored-by: Antoine Lelièvre <antoinel@unity3d.com>
- Loading branch information
Showing
8 changed files
with
291 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
Assets/Examples/DefaultNodes/Nodes/SerializedFieldTestNode.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using GraphProcessor; | ||
using System.Linq; | ||
|
||
[System.Serializable, NodeMenuItem("Custom/Serialized Field Test")] | ||
public class SerializedFieldTestNode : BaseNode | ||
{ | ||
|
||
[Input(name = "Vector 4"), SerializeField] | ||
public Vector4 vector4; | ||
|
||
[Input(name = "Vector 3"), SerializeField] | ||
public Vector3 vector3; | ||
|
||
[Input(name = "Vector 2"), SerializeField] | ||
public Vector2 vector2; | ||
|
||
[Input(name = "Float"), SerializeField] | ||
public float floatInput; | ||
|
||
[Input(name = "Int"), SerializeField] | ||
public int intInput; | ||
|
||
[Input(name = "Empty")] | ||
public int intInput2; | ||
|
||
[Input(name = "String"), SerializeField] | ||
public string stringInput; | ||
|
||
[Input(name = "Color"), SerializeField] | ||
public Color color; | ||
|
||
[Input(name = "Game Object"), SerializeField] | ||
public GameObject gameObject; | ||
|
||
[Input(name = "Animation Curve"), SerializeField] | ||
public AnimationCurve animationCurve; | ||
|
||
[Input(name = "Rigidbody"), SerializeField] | ||
public Rigidbody rigidbody; | ||
|
||
public override string name => "Serialized Field Test"; | ||
|
||
protected override void Process() {} | ||
} |
3 changes: 3 additions & 0 deletions
3
Assets/Examples/DefaultNodes/Nodes/SerializedFieldTestNode.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.