diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index 67e4bdd..1fd1a47 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -60,6 +60,7 @@ + C:/Users/stepi/Code/ld41/Library/ScriptAssemblies/UnityEditor.StandardEvents.dll diff --git a/Assets/Scripts/InstantiateOnClick.cs b/Assets/Scripts/InstantiateOnClick.cs new file mode 100644 index 0000000..43fdc0b --- /dev/null +++ b/Assets/Scripts/InstantiateOnClick.cs @@ -0,0 +1,18 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class InstantiateOnClick : MonoBehaviour +{ + public GameObject original = null; + + void Update () { + if (Input.GetMouseButtonDown(0)) + { + if (original != null) + { + Instantiate(original, transform.position, transform.rotation); + } + } + } +} diff --git a/Assets/Scripts/InstantiateOnClick.cs.meta b/Assets/Scripts/InstantiateOnClick.cs.meta new file mode 100644 index 0000000..81daa58 --- /dev/null +++ b/Assets/Scripts/InstantiateOnClick.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 081ef29388dfb6347a06f44d55a176d8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: