unity

  1. Adam2E

    can't add Unity script component?

    So im learning c# on unity, I got this error, ive gotten this error before and fixed it, but nothing im doing is working. the code doesn't seem to have errors and the script name and class name are the same. I would really apreciate some help
  2. I

    Throw or Debug. LogError ?

    Hi, everybody. Why and when do I use "Debug.LogError" if I can always use "throw"? I just don't understand the logic of the choice. I have an example of the class "SteamAPI", they are initializing and in cases of failure, "Debug.LogError.... return;" is called where the error is written...
  3. I

    Is "sealed" necessary and when?

    Hi, everybody. This operator is used so that it cannot be inherited from the class. But in the example of Unity, they had the Application class "sealed", and then in the new versions they just made the class Application. As I understand it, they did so that they could extend the Application...
  4. A

    saving many gameobjects in unity

    Hello i am new to coding and i need help from someone more experienced. I have to save 10 000 gameobjects and their boolean values at the time. I havent actually saved anything before except something in playerprefs and i dont think that is proper way of saving all things.
  5. Polski Arrow

    Cursor glitch in Unity

    Hi, I was writing code for GUI in my Unity game and I started by making just layer for this. I wanted to test script showing and hiding cursor after clicking Tab and cursor was showing and hiding many times per second. This is code fragment responsible for this function: if (openinventory)...
  6. smokereaper98

    unity slide to resize square

    lets say i have a square 2x2. when i slide my finger upwards i want it to get bigger in the Y axes and smaller in the x axes..and when i slide my finger down i want it to get smaller in Y and bigger in X. i have some code but i dont like how it works. can someone help me to create something better?
  7. WhoepzMedia

    Collab with someone on 2D Android Game

    Hi C# Expert. My name is Bjorn 35 from The Netherlands i work sinds 4 week on a 2D Game that i will publish on Android. But i have some issues with lots of things. I am not good at C# and i hope that someone wants to collab with me. I have a few functions that i want and build in unity with C#...
  8. Minapps

    How to copy an image from App to external storage Unity Android?

    How can I copy an image from my app to external storage with Unity Android ? I want to store an image in my app, and when the user clicks on a button it appears in the external storage. I found that I can use StreamingAssets or persistentDataPath but it looks like I can only read files from...
  9. AlexShad

    Question Player Movement script in Unity not working

    I am creating a Player Movement script in Unity C# and it is not working. Please review my code and tell me the problem. using System.Collections; using System.Collections.Generic; using UnityEngine; public class Movement : MonoBehaviour { // Define stuff public Rigidbody2d rb...
  10. Minapps

    Resolved How to call a Java plugin with context

    Hi, my game needs to know if the GPS is activated on an android device but I get an error. I made a plugin in Android Studio that returns true if GPS is activated and false if it isn't : package com.minapps.minappsandroidlibrary; import android.location.LocationManager; public class...
  11. Minapps

    How to access android system settings with Unity

    I'm making an app and need to be able to check if settings like : Bluetooth/Phone Rotation/Flashlight/Plane Mode/GPS/Phone Brightness/Silent Mode, are activated on an android phone. I haven't found any way to do it within Unity, using C#. I found ways to do it using Xamarin but none of them...
  12. T

    Question Beginner using multithreading and streamreader - thread hangs and become unresponsive

    Hi all, First post here - XD So I'm working on a project in Unity (an interactive, live animated twitchbot). I'm using TcpClient and StreamReader to connect to the twitch chat and read the messages. Of course streamreader.readline() causes the program to completely hang whilst waiting for...
  13. F

    Create Public Server ?

    Hi... I'm an Unity 3D Developer. I wanna to make a small chat program via WiFi between C# program and Unity 3D. In unity I can Create a public server by using this code : Network.InitializeServer(numberOfPlayers,connectionPort,false); // false = Network...
Top Bottom