i am new to unity and i am trying to make a script with c# to move forward...
the error says vector3.forward can not be assigned to (it is read only) this is my script using UnityEngine; using System.Collections; public class basicmove : MonoBehaviour { // Use this for...
View ArticleChild Object OnCollisionEnter Effecting it's Parent + Sibling Objects
Hey guys thanks for reading. I have a wall, the wall is made up of bricks. All these bricks are stored in a "Wall" empty gameObject . When my bullet hit's a brick, I would like only the brick it...
View ArticleI have been watching his tutorial but nothing happens
I downloaded the assets folder that him putted on his video, but when i add the script to the empty object, the enemy don´t lose health.THERE IS FIRTS THE MELEE SYSTEM SCRIPT AND SECOND THE ENEMY...
View ArticleUnity CS1519 Error
Argh i know its a newbie question but i'm getting an error Assets/MenuManager.cs(12,12): error CS1519: Unexpected symbol 'void' in class, struct, or interface member declaration can someone help?...
View ArticleWhy is my StartCoroutine within a IEnumerator bombing Unity? C#
The below code bombs Unity without an Error message straight to my OS. The offending line is the StartCoroutine within CheckMaximiseMenu IEnumerator. Is this issue a lack of Co-routine knowledge or a...
View ArticleCannot implicitly convert type `UnityEngine.Vector2' to `UnityEngine.Ray2D'
I am new with Unity and I need rays to work in 2d, so I am trying to use Ray2D, but I got this weird error: Cannot implicitly convert type `UnityEngine.Vector2' to `UnityEngine.Ray2D' Here is the code...
View ArticleI"Expressions in statements must only be executed for their side effects."
"Expressions in statements must only be executed for their side effects." - Debug Log Hi! Im trying to write my first simple script where the enemy (in this case a capsule) takes damage each time the...
View Articleunity reading global variables as a local variables
unity is reading all of the global variables as local variables(?)(new to C#) and when my other scipts do this ` public abstract float cycleDistance { get; }` with "float" being changed line to line...
View Articleerror CS8025: Parsing error (sorry)
Hello guys, I know this is a common mistake that circulates around here the more I wanted to know how to fix this script: using UnityEngine; using System.Collections; public class ControladorPersonagem...
View ArticleCalling a variable from another class
I am trying to define an integer "maxHealth" in one script and access its value in another. I don't understand what I'm doing wrong. Here are my scripts. public class AttributeSys1 : MonoBehaviour {...
View ArticleHelp with my Arrow Fire Script
Hi, im new to c# programing in unity and I have been trying to create a primative arrow fire script but no matter how hard I try I keep get this error after shooting an arrow: NullReferenceException:...
View ArticleImporting Image Effects to unity Pro
When I import the image effects package, I get this error(I am using Pro): Assets/Standard Assets/Image Effects (Pro Only)/ColorCorrectionEffect.cs(6,38): error CS0246: The type or namespace name...
View ArticleClearing Dynamically GameObject Array
**Hi,** well I created an array for my weapons, and when I change the selected slot of my Inventarory, I want to clear the last gameobject charged by the following code: bool slotChanged; int...
View ArticleCan I use IENumerable.Repeat in Unity?
import System.Collections.Generic; var myList = List.(); class myClass {} var myItem = new myClass(); myList.AddRange( IEnumerable.Repeat(myItem,2) ); gives this error: *MissingMethodException:...
View ArticleUnknown indentifier
Can someone please fix this code. Im new to Unity and i tried everything and i cant fix this code. I get unknown indentifier error. #pragma strict var Bullet :GameObject; var Ammo : int = 30; var...
View ArticleWhy am I getting this error?
/Scripts/Soldier.cs(113,28): error CS1061: Type `AI' does not contain a definition for `suspition' and no extension method `suspition' of type `AI' could be found (are you missing a using directive or...
View Articlehaving issues with my JS script :(
okay so I rigged and animated a downloaded character in Blender and exported it as a FBX file straight to Unity, no problems so far, I split the animations up with the correct frame times etc, I...
View Article[Closed] Getting CS0029 error when I try to check position of an object
error specifically: Cannot implicitly convert type `UnityEngine.Vector3' to `bool' Have code in c# that finds any objects tagged as "redCircle" then checks to see if any of the objects are located at...
View ArticleHelp with an error urgent
Basically, I have been trying this thing for ages and i think it might almost be working. I'm VERY new to unity and this is one of my first projects. I keep getting errors in my script but even when i...
View ArticleNeed help with error
Here is the error. "MissingComponentException: There is no 'NetworkView' attached to the "npcmcrewvar3" game object, but a script is trying to access it. You probably need to add a NetworkView to the...
View Article