1. DillsyBills

    Question How could I make it so my sprite leaves a trail behind him that kills him if touched when he moves. Puzzle Game?

    idk if anyone can help but Im making a basic sliding game and I was wondering how I would implement a way so that a trail could follow my character and if the trail is hit then the player would die and go back to the spawn point (im very new). Also are there any other was do you guys think on...
  2. Girl_Number_4

    Question How do I get a reference to the next element in my list?

    Hey people I'm trying to make a sort of inventory system for my game when the player presses e they basically add a sprite to a list. My issue is I want to use the Q button to cycle through the items in the list but I have no idea how to go about getting the next element in the list here is my...
  3. Marsnoob

    Character cannot move

    Good morning, masters. I faced a problem when I tried to create and control a player charater. I followed the tutorial online and the console detected my input, but the character did not move. How do I solve it?
  4. C

    Printing values of an array using "while"

    Hello. I am a beginner in programming and I was doing some exercises my teachers assigned and run into some problems. The exercise says that I have to print in the unity console the values of an array if when they're divided by 2 the remainder is 0. But I have to use "While" and I only know how...
  5. ReviveEarly

    Animation problem - simple fix

    Hello forum, hope you are all well. I have a little problem with my animation, which i'm certain is a simple fix. Here is my code in the update function if ((Input.GetKeyDown(KeyCode.Q))) { bool fire = Input.GetButtonDown("Q")...
  6. rnm-kmdi

    Question Unity Container, What situation are each of the lifetime managers to be used for?

    hello we are using unity IoC container for implementing a passive MVP... I'm having trouble over which type of lifetime manager I should use and why. We currently use ContainerControlled, which is a singleton, are there any other stuff that using that isn't a good idea? When should one use...
  7. rnm-kmdi

    passive mvp implementation w unity novice questions

    where view doesn't know about presenter, just raises events... presenter knows views controls (idk how to do the one where to make the presenter as if it was calling a console, for unit tests...) should view contain ui logic, or all logic is in the presenter? if view event is raised, should...
  8. M

    XML serialisaton. Error: XmlException: Root element is missing.

    Hi all. I am making a game like minecraft. I need to keep the world when the player exits the game. Chunk (it is a place 16 by 16 blocks) and world contain a lot datas, that don't serialize can. so i have created classes WorldData and ChunkData, that contain only serializable varibles. But i...
  9. 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
  10. 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...
  11. 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...
  12. 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.
  13. 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)...
  14. 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?
  15. 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#...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Top Bottom