Issue#1436: Unity - A little help with UI.Toggle

  • Hey,

    I'm having a simple but frustrating problem using toggles.

    Basically, I have 2 toggles. I want to make it so that when toggle A is on, toggle B should be off and vice versa.

    I've tried linking the following code to the UI toggles but it crashes Unity for some odd reason :
    Code (CSharp):
    1. //Linked to ToggleA
    2. public void ToggleA(){
    3.         toggleA.isOn = true;
    4.         toggleB.isOn = false;
    5.     }
    7. //Linked to ToggleB
    8.     public void ToggleB(){
    9.         toggleA.isOn = false;...
    A little help with UI.Toggle

    0 Answers

    Sorry, your answer is too short !

  • Issue#290654: Unity - Issue with EditorGUILayout.Toggle

    Hello, I have a simple Editor script where I create a toggle. In Editor mode, hitting the toggle switches correctly between checked/unchecked states. But when I switch to Play mode, the toggle gets reset to false. If I go back to Editor mode, the toggle remains false even if it was checked before I hit the Play button. Here is my script : Code (CSharp): [CustomEditor(typeof(ECAAnimRecorder))] public class ECAAnimRecorderEditor : Editor {     private bool bAutoSave = false;       public... Issue with EditorGUILayout.Toggle

  • Issue#1715: Unity - 2D Level Menu Issue!

    Hello there devs! I am making a 2d game and i just created my level select menu but i seem to be facing a problem.When the player starts, level 1 is automatically unlocked and the player needs to finish it in order to get to level 2.So when level 1 is finished i set in playerprefs the ("UnlockedLevel") parameter to 2 and so on so that the next level unlocks.But, i just realized that if the player pressed on level 1 and then somehow he goes back to the levelmenu scene without finishing it,... 2D Level Menu Issue!

  • Issue#1793: Unity - Vertex/Fragment shader : issue with alpha blending

    Hi. I am having a hard time figuring out an issue I have with a simple alpha blending shader (I had the same kind of issue with alpha test). Here are a few pictures so you get the basic idea : View attachment 170683 View attachment 170684 By simply moving the camera back and force, my shader kind of switch between being displayed and not. These screens are from the Editor, but I have the same issue In Game. However, In Game, another issue comes up :... Vertex/Fragment shader : issue with alpha blending

  • Issue#1839: Unity - iTween issue

    Hi, I got error on the console about this line of code and don't understand how to solve it, anyone can help please ? iTween.ScaleTo(tailleDistance,iTween.Hash("x",15,"y",15,"z",15,"time",1.6,"easetype",iTween.EaseType.easeInOutCubic)); Regards,

  • Issue#2470: Unity - Random Editor issue.. | seems VS 2016 is causing editor to turn all warnings into err

    It happens in all my projects, and it only happens after I open VS (double click on script), make a script change, hit save..I can fix 'one' of the errors(warnings), unity re compiles...and Editor comes back to normal..for awhile..then back to that behavior,,, This is blocking my development chi....(I could fix every single warning)... here is the thing..under 'preferences', attach to editor...I can not Turn that Off...EVER.... I unchecked it, restart is active again...(that is... Random Editor issue.. | seems VS 2016 is causing editor to turn all warnings into errors..

  • Issue#3038: Unity - Object counter issue: not working

    I am trying to make a script that counts objects in a list that are already active, I want my activeAmount to increase by 1 whenever a gameobject in the array is set to false, however I seem unable to. So far it either increases by 1 and then doesn't change, or it continuously increases without stop, any help is appreciated. I couldn't find any other question posted that dealt with this. Code (CSharp):  using UnityEngine; using UnityEngine.UI; using System.Collections; using... Object counter issue: not working

  • Issue#3977: Unity - Unet server using Web Sockets has performance issue

    I am experiencing CPU usage issue when running Unet server (as Windows desktop build) with and without checked option "Use Web Sockets". It looks like the build is 20-30x slower with Web Sockets and profiler does not show nothing interesting. Do you experience same behaviour? Is it known issue?

  • Issue#4346: [RESOLVED] Win10 UWP - Unity 5.2 System.Runtime issue

    Cannot build a Win10 UWP Unity 5.2 project in VS2015 (14.0.23107.0 D14REL). Cannot resolve Assembly or Windows Metadata file 'System.Runtime.dll' Here is what is included in the csproj file that gets created from Unity: <Reference Include="System.Runtime"> <HintPath>C:\Users\[MYLOGIN]\.nuget\packages\System.Runtime\4.0.20\ref\dotnet\System.Runtime.dll</HintPath> </Reference> The file exists at that location. In VS2015, in the Object Browser, I can see System.Runtime and the... [RESOLVED] Win10 UWP - Unity 5.2 System.Runtime issue

  • Issue#4896: Unity - Social Api issue

    Greetings! I have an issue with IOS Game Center. 1. Social.ReportProgress doesn't work. It calls !success everytime 2. GameCenterPlatform.ShowLeaderboardUi( id, tamescope) always shows all my leaderboards, but i need to open only specific board with its ID. 3. Localuser.LoadAchievements() always return empty IAchievement[] achievements with lenght == 0 All leaderboards and achievements are created in ITunes Connect and tested directly with xcode and with testflight with different users.... Social Api issue

  • Issue#5343: Unity - Tree creator bark material issue

    I'm having an issue with the tree creator. When I select a bark material for a branch, the texture is clamped (see the image). The texture itself is 1024x1024 and is set to Wrap mode: Repeat. It works without this issue elsewhere. What am I missing? View attachment 100512

  • Issue#6132: Unity - particle collision 2d never stop colliding, help need to solve this issue

    hi, i'm working on a 2d game and i'm using the new particle collision 2d available in the new unity 5.3.1 (i'm using patch 1), my particle is colliding in the right way with my player character, but after the first collision, the particle remain colliding, don't know why, this is the code that i'm using to detect the collision: Code (csharp):     public int[] DamageAmount = new int[3];   public float[] RestoreTime = new float[3];     private PlayerHealth PlayerScript;   private bool bBurned = false;... particle collision 2d never stop colliding, help need to solve this issue

  • Issue#6287: Issue with Trail renderer in Unity 5.3.x

    Hi, I am trying to render trails in Unity 5.3.x and i get two issues: 1. In Forward rendering mode the Trail flickers constantly and most of the trails are invisible half of the time 2. In deferred some work as supposed, others dont appear and others work half way (sometimes appear, sometimes not) The same scene in forwards rendering may show a flickering trail group and changing to deferred on the fly fixes it and looks great (in other scenes does not happen that well and both forward... Issue with Trail renderer in Unity 5.3.x

  • Issue#7054: Unity - Issue: screenshots of GUI elements with rendertexture

    I'm making a drawing / coloring app. I use uGui for stamp/sticker functionality. I'm trying to use a rendertexture to make a screenshot. But the GUI elements don't show up on the render texture. The GUI elements are on a Screen Space - Camera canvas which is rendered by my Main Camera. When I'm taking a screenshot I set the target texture of my camera to a rendertexture, take my screenshot, and reset. Everything shows up in the PNG except the GUI elements. This is my code: Code (CSharp): ... Issue: screenshots of GUI elements with rendertexture

  • Issue#7586: Unity - Issue with platform settings, changes not applied

    Unity 5.3.1 on Mac, trying to do this: "To fix this you must select the file in the plugins/ios folder. Once you select it you can enter a value in Compiler flags. Put -fno-objc-arc. Another new feature of Unity 5 is that you can now specify additional frameworks that are needed by the plugin. You do this by opening the Rarely used frameworks section and checking the CoreBluetooth framework. " However when I tick the CoreBluetooth framework or enter the compile... Issue with platform settings, changes not applied

  • Issue#9390: Unity 5.3.1p2 Light Probe issue: dark spot in the opposite direction of the directional light

    I can't figure out why I get the dark shadow on the opposite side of the directional light. See image. The light probe that is in the shadow of the cube doesn't get that shadow. As soon as the probe moves out of the cubes shadow it does that. What am I missing?

  • Issue#10523: Unity - Make toggle not start timer until app restarts

    Ok this is kind of confusing to figure out but I have a toggle that sets a timer to start when my app first starts but when I set it the timer starts right away and I have to stop the timer, the timer works fine and I can kind of live with it the way it is if I have too but ideally I would like that when I toggle the timer to be auto time that it will not start the timer right away but only start it when my app starts if the toggle is set that way. Now it does start right away when my app... Make toggle not start timer until app restarts

  • Issue#12442: Runtime issue with 64bit Unity game integration into iOS native app

    My company integrates Unity games into our native iOS app. Basically our iOS app would run the Unity code when a user decides to launch any of the games. With the past 32 bit of Unity and native iOS code, we were taking Unity generated Xcode project files, and compile them into a static lib for the native iOS app to use. Whenever the user chooses to launch any of the games, UnityAppController would be loaded, and ran. This worked well for us. But with the latest 64 bit builds, the same... Runtime issue with 64bit Unity game integration into iOS native app

  • Issue#16104: Unity 5.2 issue! Lightmaps are blocky on iOS

    My lightmaps look as they used to in the editor, but in my iOS builds (iPod 5th Gen) they render as if point sampled (no filtering / blocky). This only started happening since upgrading to Unity 5.2. Has anyone else seen this? Here are screenshots of the lightmaps as they appear on my iPod. View attachment 154132 View attachment 154133 View attachment 154135 I mean.. it's a look, I guess... It kinda fits with the blocky theme of the art.. but... ya, I'de rather find out... Unity 5.2 issue! Lightmaps are blocky on iOS

  • Issue#16107: Unity - Issue with specific graphic drivers

    Hi, I am facing an issue on a specific device that I found really hard to track and I was hoping someone could help me in finding ways to identify the issue. Our game is crashing on a specific device (Samsung Galaxy Tab 3 Lite 7''). The crash seems to be happening within a graphic library of the tablet: at libGAL.computeWLimit(computeWLimit:104) at libGAL.computeWLimit(computeWLimit:68) Sadly, there is not much information about that library, and 0 result on Google on the specific... Issue with specific graphic drivers

  • Issue#18457: Unity - Serialization Issue

    Hey, I know Unity has some problematic serialization issues (such as not serializing dictionaries, which is very sad), but I ran into a problem I didn't expect I would. Here's the scenario: Class 1 (Scriptable Object, serialized properly, where Bar is another class (not struct)): Code (CSharp): public class Foo : ScriptableObject {      public List<Bar> MyList; } Class 2 (pseudocode): Code (CSharp): public class Baz : MonoBehaviour {      public Foo reference = GetReference();... Serialization Issue

  • Issue#18939: Unity - UI and Audio Toggle, Volume Problem.

    Hi, I've created an audio toggle for my projects title screen. I switch out sprites ( so that I can have an on / off visual icon ). Problem : After following a tutorial online to toggle the music when I click my ui button, the tutorial only really covers the 'volume' itself, so that means I lose all my sound effects also when I toggle, not just the music, how can I 'only' toggle my music on / off, but keep the sound... UI and Audio Toggle, Volume Problem.

  • Issue#19769: Unity - Focus issue in WebGL - Prompts when eating cursor

    Hello! We're currently experiencing issues when trying to eat the cursor, the issue depending on which browser you're using. Chrome (v47) Works as intended - cursor is eaten without any prompts Opera (v34) Doesn't work at all. You're stuck in an endless loop since the client loses focus when you press "Allow" Firefox (v43) Prompts whenever you press play, but works as soon as you allow Can we change anything in order to not receive prompts in Firefox and Opera? Thanks!

  • Issue#20576: Unity - Dynamic Maze Issue

    Hi, I have a prefab wall which has a mesh render and mesh filter and box collider. This, i believe, enable basic collision detection and stops the player/enemies walking through the wall. I then dynamically generate about 1600+ of these prefabs. My problem is i noticed that game slows right down as I increase the number of these walls. I have decided to try and combine all the prefab meshes together after they are generated. This seems fine to me but I would like to know how to retain the... Dynamic Maze Issue

  • Issue#24294: Unity - Criticql Issue Building for the Contest

    Hi ! We just tried to finalize our game for submission this night, but we keep having an issue at building our game. We first builded the game in release and everything was fine until certification, which failed at API Support (because of uwphost.dll). FAILED Supported APIs Error Found: The supported APIs test detected the following errors: API ExecuteAssembly in uwphost.dll is not supported for this application type. Zen Balloons.exe calls this API.... Click to expand... Criticql Issue Building for the Contest

  • Issue#24631: Unity - Auto Tiling Issue

    Hey guys! I got an issue using a script to auto tile my textures. It actually works, but it tells me the following message whenever I hit play: Instantiating material due to calling renderer.material during edit mode. This will leak materials into the scene. You most likely want to use renderer.sharedMaterial instead. UnityEngine.Renderer:get_material() And I don't want to use "renderer.sharedMaterial" cuz that would set the tiling of the material equal to all others even tho the... Auto Tiling Issue

  • Issue#27439: Unity - Reflection issue since 5.2.3p3

    One of our plugins from the asset store has a function like this Code (CSharp): public PropertyInfo GetProperty(Type type, string name)         {             return type.GetProperty(name);         } type in this instance is a Unity Transform type. name is "eulerAngles". This works in 5.2.3f1 but on 5.2.3p3 and 5.3+ it stopped working on WebGL and iOS. Instead "null" is returned. Is this a deliberate change in Unity does anyone know or a bug?

  • Issue#27851: Unity - WebGL build on OSX / Retina screens issue

    Hi - I'm struggling to get a webGL build to look good on a retina screen. According to the canvas style sets the window points while the width/height attributes define the drawing buffer size. In practice setting the w/h as 2x the style w/h results in the unity content being drawn in 1/4 of the screen. Is there any way to get a Unity WebGL build looking good on a retina screen?

  • Issue#29301: Unity - Problems with spotlight on mobile, precision issue?

    I have been trying to solve a problem I have had for a while with real time lighting on iOS devices (unsure if this will happen on Android as well). As you can see in the supplied screenshots, on PC the light source works as expected, but something goes on with the projection when running on mobile. Now, this spotlight uses a light cookie, but the same result occurs if I remove it too. When the camera is close to origo, it works fairly well, but moving further away (unsure when it starts... Problems with spotlight on mobile, precision issue?

  • Issue#31962: Unity - Subprefabs in prefab issue

    I've tried to Instantiate prefab that contains different prefabs and then set transform.Parent(container, false) It seems to work BUT the position of the subprefab inside this newly created prefab was invalid (it has the different z coordinates) compare to prefab created manually by drag and drop on to the scene - in this case everything is ok and the subprefab transform is set properly. Does anybody face the similar problem? Thanks in advance for any help