word
Wolfie
Creator of
Recent community posts
I wrote this script to follow the player, but it just moves upward forever.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class follow : MonoBehaviour
{
public GameObject Player;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
Vector3 Location = Player.transform.position;
transform.Translate(Location*Time.deltaTime);
Debug.Log(Location * Time.deltaTime);
}
}
Here is the output:
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Dev\UNITY\Dont live\Library\ScriptAssemblies\Assembly-CSharp.dll'.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at Mono.Cecil.AssemblyDefinition.ReadAssembly(String fileName, ReaderParameters parameters)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at TypeDbJsonGenerator.Program.<>c__DisplayClass4_0.<Read>b__1(String x)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.ToList()
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at TypeDbJsonGenerator.Program.Read(String[] pathToAssembly, String[] searchDirs)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at TypeDbJsonGenerator.Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
--- End of inner exception stack trace ---
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Dev\UNITY\Dont live\Library\PlayerScriptAssemblies\Assembly-CSharp.dll'.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at Mono.Cecil.ModuleDefinition.GetFileStream(String fileName, FileMode mode, FileAccess access, FileShare share)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at Mono.Cecil.ModuleDefinition.ReadModule(String fileName, ReaderParameters parameters)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at Mono.Cecil.AssemblyDefinition.ReadAssembly(String fileName, ReaderParameters parameters)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at TypeDbJsonGenerator.Program.<>c__DisplayClass4_0.<Read>b__1(String x)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.Linq.Enumerable.WhereSelectArrayIterator`2.ToList()
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at TypeDbJsonGenerator.Program.Read(String[] pathToAssembly, String[] searchDirs)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at TypeDbJsonGenerator.Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
--- End of inner exception stack trace ---
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
at Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Build completed with a result of 'Succeeded' in 24 seconds (24367 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)