Button doesn't show up in pause
The pause function works but there is no button while paused. var paused : boolean = false; function Update () { if(Input.GetKeyDown(KeyCode.Escape) && paused == false) { paused = true; if...
View ArticleProblem accessing variable from another C# script
It says "An object reference is required to access non-static member `Messages.MessageText'" on line 21 and 23 in ItemSwordUneq ItemSwordUneq using UnityEngine; using System.Collections; public class...
View ArticleHow to make text pop up for a few seconds?
Like in Call of Duty, when you get a kill, your XP pops up for a second and then disappears. How would this be done in Unity. If you could give me and example in a script, preferably C#, but JavaScript...
View ArticleBoolean is set to true but is unchecked in the inspector
I have a boolean called canLoad in my script. I set it to true in the code and in the inspector it's unchecked. I use it in the Menu_SP() method and when I start the game, it behaves how it should if...
View ArticleBest method to update games made in unity free?
Once I finish my game, I want to be able to send out updates. I know I can't use asset bundles because it's the free version. What methods are there to do this?
View ArticleProblems Importing Scene
I made a scene in an old project that I want in my new project. I tried copying the scene into my project, but everything was pink and I had a bunch of errors. I also tried exporting the old project as...
View ArticleHow to disable mesh renderer of declared gameobject?
Hi, I have a script on my player and it needs to make my gun invisible that is child of my camera, which is a child of my player. I declared a gameobject and set my gun to it. I tried declaring a...
View ArticleAim Down Sight Offset Changes After Weapon Swap
When I aim down sight the first time, it works fine http://gyazo.com/2eac134ac07219e865b3a57e7c930289.png Then I switch weapons, my secondary works fine too...
View ArticleWhy does this not work?
I'm trying to make it really easy to rotate a cube when pressing the E key. I don't get any errors or anything, but when I play and press or hold E, nothing happens. How can make an object rotate...
View ArticleHow to make an object go the direction it is facing?
I have a cube that is my player and I can move it with WASD. I can also rotate it with QE. When I rotate it though, it still goes the the same direction when I press a directional button. It doesn't...
View ArticleHow can I input more than one digit numbers on my calculator I made?
I made a calculator and everything works fine, I just don't know how I would make it able to do more than one digit numbers. Can you please help me out? Here is the code: using UnityEngine; using...
View ArticleProblem accessing enum from other class
I'm trying to check the enum of an item from a list of a class called Item. I get an error that says it can't access the static member with an instance reference. Here are the scripts: Item class:...
View ArticleMethod is called, but GUI doesn't show up
I have a chest that is supposed to display either player inventory or the chest's inventory. The first menu has buttons to choose which of the inventories to display, when I click the buttons, it stays...
View ArticleBest/Cheapest Way To Have Online Accounts On PC?
I want users to have their own online accounts when the play my games. I would like to be able to create and login to this account across all of my games. Coding it isn't really the problem, it's where...
View ArticleAccess a variable easily from anywhere
I want to be able to make a variable for the character's name that the player will choose, then easily be able to put it anywhere, something like %playerName%(not exactly that, just showing what I...
View ArticleBest method for Skyrim-Like character customization?
I was planning to do some kind of character customization, similar to Skyrim, but not near as detailed. I was just planning to do a few different hairstyles, colors, and clothes. I can't think of any...
View ArticleFind angle between two gameobjects?
I know this has been asked a lot, but the only answer I see is Vector3.Angle, I don't want to use that. I'm making a graphing calculator, I have everything working fine, except I can't find what angle...
View ArticleAdd random amount of random items from one list to another?
I have a list that contains every item in my game and a list list for chest contents. I want to randomly choose some items from the main items list to put in the chest list, but based on a rarity enum...
View ArticleCan you use GUIStyle with GUILayout?
I tried it and got an error that GUIContent had some invalid arguments. How do you use GUIStyle with GUILayout? I really need to do it.
View ArticleHow to make camera only follow object rotation on x and y axis?
I have a spaceship game I'm making and I want the camera to rotate with the spaceship on only the x and y. I don't want the camera rolling with the ship, just tilting and turning. Smooth follow seems...
View ArticleToo tired to figure this out...
I know this would normally be a pretty easy task, but I just woke up after four hours of sleep and cannot for the life of me figure it out. So basically I want to open up a GUI when I push a button,...
View ArticleError when transferring items from one list to another
I have an inventory and chest system setup and it works pretty good for the most part. When I click an item in the chest it goes to my inventory, and vice versa. But if the chest has more items than my...
View ArticleMake LineRenderer from one Vector3 to another Vector3?
I made a graphing calculator and I want to connect the points that are spawned with a LineRenderer. I have this function that I want call the line with: void DrawLine(Vector3 a, Vector3 b) { // Code to...
View ArticleHaving problem with constructor
I'm making an inventory system and I want to code all the items in manually using a constructor, I find it more fun that way, but I'm getting an error. Item Class: using UnityEngine; using...
View ArticleCan't access methods from class
So I have this script with two classes: using UnityEngine; using System.Collections; public class GameItem { public string ItemName { get; set; } public string ItemDesc { get; set; } public Item_Type...
View Article
More Pages to Explore .....