# DataLink attribute

By using DataLink attribute, input from constant or data flow can be accepted even if there is no corresponding type InputSlot or FlexibleField.

ScriptReference : DataLink

### Example script

Create ExampleDataLinkBehaviour script file and write the following code.

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    using UnityEngine;
    using Arbor;

    [AddComponentMenu("")]
    public class ExampleDataLinkBehaviour : StateBehaviour
    {
    	[System.Serializable]
    	public class ExampleData
    	{
    		public string name = "Test";
    		public float power = 100f;
    	}

    	[DataLink]
    	public ExampleData exampleData;
    }

### Notes

- It can only be used in the fields of classes that inherit NodeBehaviour (such as StateBehaviour and ActionBehaviour).
- It can not be used for arrays or lists.