Issue#620362: Unity - [SOLVED]Why doesn't this code work?

  • I have a line of code that works perfectly:
    Code (CSharp):
    1. gameCamera.GetComponent<CameraController>().cameraTarget = SelectedPlayer.transform;
    I then have this code that should do the same thing:
    Code (CSharp):
    1. gameCamera.GetComponent<CameraController>().cameraTarget = army.selectedArmy[character].gameObject.transform;
    In the second line I am trying to get the camera to focus on a game object by clicking a UI button and it focuses on an object depending on it position in the list...

    [SOLVED]Why doesn't this code work?

    0 Answers

    Sorry, your answer is too short !

  • Issue#325537: Unity - Graphics.Blit() on Android it doesn't work(solved)

    Hi! In editor Blit work fine, but on devices doesn't draw object with RenderTexture at all. code: Code (CSharp):   public Camera TowerRenderCamera;// it camera on which attached this script     public GameObject Edges;     public Material mat;     public RenderTexture RenderTex;     private void Start()   {     SystemController root = GetRoot();       Vector3 size = new Vector3(root.Width, root.Height, 1.0f);       Vector2 scale = size;       Edges.transform.localScale = scale;       RenderTex = new... Graphics.Blit() on Android it doesn't work(solved)

  • Issue#620213: Unity - Why doesn't this code work?

    I have a line of code that works perfectly: Code (CSharp): gameCamera.GetComponent<CameraController>().cameraTarget = SelectedPlayer.transform; I then have this code that should do the same thing: Code (CSharp): gameCamera.GetComponent<CameraController>().cameraTarget = army.selectedArmy[character].gameObject.transform; In the second line I am trying to get the camera to focus on a game object by clicking a UI button and it focuses on an object depending on it position in the list... Why doesn't this code work?

  • Issue#762602: Unity - [Solved] WebGL & XmlSerialization combo doesn't work

    Unity 5.3.2 I can communicate to my server just fine if I run it in the Game View. But when I try to build to WebGL (Development build) and run, I get the error: Code (CSharp): LoginRegisterData cannot be serialized because it does not have a default public constructor But I do?? Code (CSharp):     public class LoginRegisterData     {   [XmlElement]   public string Username { get; set; }   [XmlElement]   public string Password { get; set; }   [XmlElement]   public int Id { get; set; }... [Solved] WebGL & XmlSerialization combo doesn't work

  • Issue#993373: Unity - why my code Doesn't work (C#) ?

    i create sprite rendere and i want to Destroy it when click == 2 so what is wrong here ! Code (CSharp): public   SpriteRenderer Select_Cirlce;   void Update()     {               if (Input.GetMouseButtonDown(0))         {               RaycastHit hit;             Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);             if (Physics.Raycast(ray, out hit, 1000.000f))             {                 Click++;                 if (hit.collider.tag == "Mosad" && mosad == false)... why my code Doesn't work (C#) ?

  • Issue#1082949: Unity - Random Color.Lerp doesn't work. [SOLVED]

    Hi, Can someone explain me why this script isn't working? It's attached to my player that I want to change between random colors. Code (CSharp): using Random = UnityEngine.Random;   Color colorStart;     Color colorEnd;     float rate = 1;  // Number of times per second new colour is chosen     float i = 0; // Counter to control lerp   void Update()     {         // Blend towards the current target colour         i += Time.deltaTime*rate;         rend.material.color = Color.Lerp (colorStart,... Random Color.Lerp doesn't work. [SOLVED]

  • Issue#3197: Unity - [SOLVED]Help Condensing Code For Efficiency

    I am not sure how simple or complex this will be but, help is much appreciated. I want to be able to condense this into one function that will work for as many characters as I choose to add. Right now I am applying each function to is respective UI button. I feel like there is a more efficient way of writing this rather than copying and pasting 20+ times. Code (CSharp): public void ChooseCharacterOne(){         //characterOneActive = !characterOneActive;         if (characterOneActive ==... [SOLVED]Help Condensing Code For Efficiency

  • Issue#4225: Unity - SceneManager.SetActiveScene does not work [SOLVED]

    It basically doesnt work. Code (CSharp):     public void OnLoading(GameStateEvent ev)     {         SceneManager.LoadScene(Game, LoadSceneMode.Additive);         Game_scene = SceneManager.GetSceneByName(Game);         SceneManager.SetActiveScene(SceneManager.GetSceneAt(1));       } aaaaand nothing. The other scene is still active, and if i manually set active scene in editor it works. Checked the variables with debugger all proper, Game_scene contains the right scene, it just doesnt work.

  • Issue#5238: Blender Armature - Root Motion doesn't work in Unity.

    So, I tried to import my characters with animations to unity but the root motion bone does not move the character in unity. What is the problem here? Here is a quick TEST file I created. When I import it, it does not work properly in Unity. The character doesn't move foreward. I've got the root bone and I animated it in blender to move my character forward. When I play the animation in the inspector, the animation works fine but it doesn't loop and the character can't move forward.

  • Issue#7424: Unity - Button color multiplier doesn't work?

    the button color tinting and color multiplier doesn't work. It seems it only tints sprites, but I would assume that the reason for the multiplier is to brighten images higher than the initial bitmap (Which also what the help description states) but for me it can never go brighter only darker. If this is the case I don't see the point of the color multiplier setting. Any help appreciated Joachim

  • Issue#8019: Playstation - My code for nuk3town doesn't work

    Hello everyone activision send me a mail with a code for nuk3town and it doesn't work...

  • Issue#15771: Unity - Render Texture doesn't work in VR mode

    I am using render texture to implement mirror reflection. It work fine in editor and non VR mode. But once I build to GearVR with VR mode on, the texture become black. I tried play with Target Eye and GLES versions but nothing works. Any insight? Image #1 is in non-VR mode, the cube has render texture from a camera which look at the sphere Image #2, the same scene, just turn on VR mode. the sphere and the plane disappear in render texture...

  • Issue#16604: Playstation - Black Ops 3 Nuketown Code Doesn't Work

    I got a black ops 3 nuketown code, but when I put it in. It said that the code might've been use already or is not from this region. Please Help

  • Issue#16752: Autodesk - Issue! Intuos pro promotion for 12 months doesn't seem to work

    I've tried to redeem the premium pack for purchasing the Wacom Intuos Pro Tablet. Following the steps one by one. The instructions from the link Wacom sent were: Congratulations on your Wacom® Intuos® Pro purchase!Redeem your FREE 12 month SketchBook Pro Membership in just 2 easy steps: 1. Create a SketchBook account.When you create your account, you’ll automatically have Pro membership added to your profile. If you already have an account, simply log in to enable your Pro membership. 2. Download SketchBook.After completing the redemption process SketchBook will automatically begin to download. Log in within the app to unlock your Pro features. I clicked the "Redeem FREE 12-Month Membership" button and create an account like the link asked, but my account stills shows: Membership Description: Free. What else can I do to redeem the 12 month membership? Please reply as soon as you can because the promo expires 1/31/2016

  • Issue#18113: Oculus doesn't work in Unity Editor 5.4.0b3

    Hi, In Unity 5.4.0b3 I can't use the Oculus to work inside the Unity Editor as I did it in 5.3. I have the Virtual Reality Supported enabled and I tried with all the devices in Virtual Reality Devices list. Is this an expected behaviour or a bug?

  • Issue#30249: Unity - adaptive reinhard doesn't work on procedural skybox

    Hi everyone, I'm trying top use the adaptive reinhard tone mapping effect which is going fine except that it doesn't work for the one brightest thing in the sky.. The sun is part of the procedural skybox Unity provides and even at maximum exposure the tone mapper doesn't react to the sun much at all, but has a huge reaction to the lit up terrain. It is very noticeable seeing as the sun should have a huge effect on the tone mapper.. How does anyone use it properly? I could use a hdr... adaptive reinhard doesn't work on procedural skybox

  • Issue#31356: Unity - WaitForSeconds doesn t work?

    Hi there.. I would like to start the animaton after 5 seconds, so I added "yield WaitForSeconds (5)", but If I add that line, the animation doesn't start anymore.. why? Code (JavaScript):  var Animazione = "Vagone"; var on : boolean; function Update () { if (Input.GetKey(KeyCode.Q)) { on = !on; if (!on){ yield WaitForSeconds (5); GetComponent.<Animation>()[Animazione].speed = 0.5; GetComponent.<Animation>().Play(Animazione); } if (on) { } } }

  • Issue#33754: Sqlite database doesn't work on Unity games build to Android Devices

    I'm using the Sqlite as Unity Game database and works on Unity Editor, but when I build to Android Devices the Game can't access the database, what can I do to make the script works also on Android Devices ? Programs/Versions used: - Unity 5.3.1f1 - Sqlite Precompiled Binaries for Windows 64 (sqlite-dll-win64-x64-3100200.zip (688.01 KiB)) Folder Structure: -- Assets/Database/MyDataBase.db --... Sqlite database doesn't work on Unity games build to Android Devices

  • Issue#34151: Giffgaff - swap sim doesn't work lost code of old sim card but have the new

    I've been trying this so many times, I have a new sim with activation code but i do not have the old activation code of the old sim, i guess because of this the swap doesn't take place, I've tried this with two different handset over the period of two months and ended up selling the phone buying a new one and still can't swap the sim to new phone, waited already more than 24 hours

  • Issue#44073: Linux - [SOLVED] bash script: can echo command, command works if I type, but command doesn't work in

    My goal is to understand what is going on: The following script is given the name 'marg': ------------------------------------------------ #!/bin/bash d=$(dirname "$1") b=$(basename "$1") echo find "$d" -name ""$b"" -type f -print ------------------------------------------------ If I type marg './foo/*' bar/ in an xterm, the result is find ./foo -name "*" -type f -print If I type the above command into an xterm it executes ok. But if I change marg to ------------------------------------------------ #!/bin/bash d=$(dirname "$1") b=$(basename "$1") find "$d" -name ""$b"" -type f -print ------------------------------------------------ then If I type marg './foo/*' bar/ in an xterm, the result is that the find command does not execute. WHY? P.S. For those wondering "what am I trying to do?" the answer is: I am trying to understand what is going on with the

  • Issue#47073: EA - Activation code doesn't work

    I just bought and received ME3 on ebay. Everything is there in the game case including the manuals and the activation code. I tried to install it using the code but it says the code is invalid because it has been used already. Is there some way I can get my code re -validated or some such thing, or am I screwed? 

  • Issue#56580: Giffgaff - I've used my PAC code to move to another network and it doesn't work

    I did everything correctly and nothing happened.i was in the shop trying to fix the problem and they said the PAC code is not good.please check what went wrong and fix my problem.i want to move my number to another network.

  • Issue#58913: Unity - Colliders Doesn't work on scalable sprite

    Hello, I'm new here! So, I'm creating my game, which has no gravity effects. There is two boxes, a player and an enemy. The enemy's size is fixed, but the player's isn't; in fact, when I press "a", the box scales up and when I release the key, the box scales down. I've attached rigidbodies2d and colliders2d, but when these two collides, the event doesn't work. It means when the player scales up and arrives to the enemy, nothing is happening. I want that these two colliders interact, but... Colliders Doesn't work on scalable sprite

  • Issue#61010: Unity - IK doesn't work

    I try create IK for my game, but function OnAnimatorIK() doesn't call. What is it: bug or unreleased feature?

  • Issue#62716: Unity - [Solved] Diagonal movement speed issue

    Hello. I am attempting to move my player up, down, left, and right on a 2d plane. However, I was getting what is apparently a common issue where diagonal movement was compounded by 2 different vectors equalling more than 1. The solution, apparently, is to normalize the vectors and then use those normalized vectors to move the object at the end of the function. The problem I am having now is that I can no longer move up or down, it only allows me to move left or right, and I can't figure out... [Solved] Diagonal movement speed issue

  • Issue#70018: Asus - Q Code 99 issue and how I solved it.

    This is my first high endish gaming computer, my old Asus G51 was not playing games on high or even medium well anymore so I decided to upgrade and thats what leads to this post. Here is my setup. VIII Hero Motherboard I5-6600K Gskill 32Gb Ram 4x8 WD 1TB HD 1 DVD Drive CoolerMaster Hyper 212 Fractal R5 Gaming case Evga Supernova 750 PSU XFX R9 390 I installed everything over a full day carefully putting everything in its place and hooking up the correct wires, everything looked amamazing and I was ready for the first boot up. I press the bootup button and it lights up with beautiful fan and MB led lights. It goes through the codes all the way up to Q 99 with the Boot LED lit then the fans slow down and nothing...No display, no beeps, just...nothing. Hmm thats weird. So I try it a few more times and the same issue. I talk to asus support and realize that my RAM is not on the QVL (Although GSKILL says it will work). They say I need to RMA it. I decided to order some QVL Ram and have

  • Issue#77241: Unity - in forward HDR doesn't work: ultra brights objects show up dull through transparent material

    to get true HDR, only deferred works.

  • Issue#79646: Unity - Sprite Packer doesn't work.

    I have opened the sprite packer in the editor settings, and give the packing tag of my sprite. But when i click the pack button of sprite packer window, nothing happened. I try to create a new project to do this, and it works. Is there any way to fix the problem of my old project ?

  • Issue#86288: Unity - Code doesn't seem to working more than once.

    Code (CSharp): using UnityEngine; using System.Collections;   public class WebAPI : MonoBehaviour {       public WWW GET(string url)     {           WWW www = new WWW(url);         StartCoroutine(WaitForRequest(www));         return www;     }       private IEnumerator WaitForRequest(WWW www)     {         yield return www; yield break;     }       float waitTimer = 0;     // Ping the location to the server every 10 seconds.     void FixedUpdate()     {         if (waitTimer <= 0.0f)         {... Code doesn't seem to working more than once.

  • Issue#87832: Unity - Why doesn't my blur shader work with linear rendering?

    I've been working on a shader for UI and other aspects of a project i'm working on, I was wondering if anyone knows how I can make it work with linear rendering, as I really want to use linear rendering for this project. The buttons are using the blur shader. Screenshots and shader code: Gamma: Linear: Code (CSharp): Shader "Blur/Blur1xPass" {     Properties {         _TintColor ("Tint Color", Color) = (1,... Why doesn't my blur shader work with linear rendering?