Click here to Skip to main content
15,888,351 members
Everything / Unity3D

Unity3D

Unity3D

Great Reads

by LLLLGGGG
In this article, I am going to explain how to generate a hexagonal tessellation and how to draw it in Unity 3D
by Joel Ivory Johnson
In this article I take a look at setting up a system for HoloLens development, the compatibility of the applications with other UWP platforms, and introduce Unity for making a 3D application
by IAmJoshChang
Attacking enemies, health system and death animation in Unity
by EgorYusov
This article describes Unity low-level plugin interface and the Unity graphics interface emulator that facilitates native plugin development.

Latest Articles

by EgorYusov
This article describes Unity low-level plugin interface and the Unity graphics interface emulator that facilitates native plugin development.
by Grasshopper.iics, Abhishek Nandy, Moumita Das
Virtual Reality with Unity, Intel Edison and MQTT
by Dev Leader
How to get all the painted tiles on a TileMap when building a 2D game in Unity3D
by DaveMathews
Using an on-device bot development framework to integrate a chatbot into unity

All Articles

Sort by Updated

Unity3D 

27 May 2020 by #realJSOP
I wrote an article for CSV importing that you may find useful - CSV/Excel File Parser - A Revisit[^]
4 Mar 2021 by #realJSOP
Build a proper entity (model) in your app, and let the xml serializer handle the nasty stuff...
30 Dec 2021 by 0x01AA
Have a look on line 17: 15 if (Input.GetKeyDown("f")) 16 { 17 Postion.SetActive (false);}} //
15 Apr 2014 by Abhinav S
These may help -Transform.Translate[^]Video - How to move a gameObject[^]http://answers.unity3d.com/questions/14279/make-an-object-move-from-point-a-to-point-b-then-b.html[^]
18 Dec 2014 by Afzaal Ahmad Zeeshan
Ever heard of animations? Animations are more like videos being played on the screen when you play the game. They are no more than just images just being replaced by the next image, because the video data type in real is just a bunch of images being replaced by the next image very fastly that it...
2 Sep 2015 by Afzaal Ahmad Zeeshan
First of all you need to understand the basic different between them so that you can choose which one to use in your case. First of all, Unity3D is a gaming engine and Xamarin is a cross-platform application development framework. Although there purpose is same, but their functionality and...
19 Oct 2015 by Agarwal1984
Hello,How to develop data enter application using Untiy3D with MS Sql Server Database?Its a need of client or project.Please help me.Thanks in Advance.Ankit AgarwalSoftware Engineer
4 May 2016 by Agarwal1984
Hello,How to load unity3d application in unity web player using c# .net?when i write path in directly src property so its running but when i write path through c# code its not running.How it can i resolve this issue.I want to load object on click event in UnityWebPlayer.Please...
3 Feb 2021 by aitanar
using System; using UnityEngine; using UnityEngine.UI; namespace UnityStandardAssets.Utility { [RequireComponent(typeof (Text.))] public class FPSCounter : MonoBehaviour { const float fpsMeasurePeriod = 0.5f; private...
13 Jun 2018 by Alienkani
Hello, Developers I am working on an AR application for android device. and i am using the tool "Unity Game Engine" the problem is that I don't want that when user install the android app from playstore it will not create shortcut icon on home screen. What I have tried: I have tried to delete...
12 Feb 2024 by Andrew Akram
I have this code here that displays a game object when I press E on the keyboard the only issue is it works with the host and nothing happens when the client interacts with it when he presses E. what is the solution or what I'm doing wrong and...
2 Mar 2015 by Android on Intel
This document walks through the steps to produce a fat APK that includes both x86 and ARM libraries from within the latest Unity 4 or Unity 5 versions.
12 Mar 2014 by andry fajar
Please help me,I've been approached frustrated how to serial communication arduino uno with unity web player? can i see an example of the source code?
21 Mar 2014 by andry fajar
Please help me ,I have a problem regarding valiable calling from c # to javascript in asp.net .how to perform real-time retrieval of Arduino uno without wifi shileld through C # then passed to the javascript that will be displayed on the web . where the transmitted data is worth " 0 " and "...
25 Mar 2014 by andry fajar
I want to asked, how to automatically create a serial port in unity? there any sample source code.Thanks
26 Apr 2022 by Antonio_Rodrigues
I don't know why, but the error are in the returns. public class funcoes : MonoBehaviour { int testSumArray(int[] numbers = null, int b = 2) { numbers = new int[] { 8, 3, 9, 6, 7, 4 }; int conta = 0; for(int i =...
28 Apr 2022 by Antonio_Rodrigues
The function instead of receiving as input parameter a parameter of type int which will receive an array of ints and a int number that we will call b. The end of the function will be to return true or false in case some or all of the numbers in...
28 Apr 2022 by Antonio_Rodrigues
I was asked to make a function int return bool and I can't find a solution, I though you can't return bool in a function int. I just need to know if is posivel. What I have tried: I tried to search everywhere but I couldn't find a solution and...
7 May 2023 by arpitsrivstva
I want to consider the edges/borders of the screens and place the gameObject accordingly with sufficient padding across those edges/borders of screens. Also I have to keep the scale(x & y) equal. I have to prevent it from being bigger or smaller...
10 Oct 2016 by Ashley Davis
A look at version control from the game developers perspective
8 Mar 2022 by barbiomalefico
1. for any update you call the function Move that change the vetore move based on gravity. It start with 0 then it became different from 0. 2. Jump speed is always constant not related to the playerSpeed.
6 Dec 2014 by Basharat Hussain
HI am working on football game i have a character name lonhjhon tag name player and a ball tag name "ball" i need help in scripting regarding how to keep ball in front of player while player is moving forward or right left. (ball control remain in player hand until he kicks) i have made the...
22 Mar 2018 by benysebag
I am trying to create a LOGIN/REGISTER solution for my app developed via Unity 3D (version 2017.3.0f3). The MySQL DB is located in a paid hosting service in order to avoid restrictions usually caused by FREE hosting services. For some weird reason, it looks like the method...
17 Dec 2014 by Bhagat Bir Singh
I wanna develop a game(C# unity 3d) of my own. As my final year project. I am a fresher.Where should i start?What are the requirements for developing a game?Is it possible to develop a game within three months for a single person.Any website, blog, e-book,,,etc...???
16 Jan 2019 by BlackMATov
It's a story on how to write a plugin for Unity Asset Store, take a crack at solving the well-known isometric problems in games, and make a little coffee money from that, and also to understand how expandable Unity editor is. Pictures, code, graphs and thoughts inside.
23 Nov 2015 by BladeLogan
Hello!So my friend is trying to develop a game like Clicker Heroes.& he needs to know what the best way would be to go by when making such a game, would Unity be the best option? Or could he do it in a WPF app in visual studio.What we are trying to figure out is what would be the...
7 Jan 2021 by Blake Burnell
I am new to programming on c#, I have been watching a 3 and a half hour tutorial and up to this point everything was going smooth. The error message says "There is no argument given that corresponds to the required formal parameter 'force' of...
12 Jan 2021 by Blake Burnell
Having a problem here while trying to create an effect for enemies to fall over after death, the Unity error says: CS1061 'Transform' does not contain a definition for 'LocalEulerAngles' and no accessible extension method 'LocalEulerAngles'...
24 May 2021 by Blake Burnell
I am having a Null error that I cannot figure out how to solve, unlike my other Null errors. The error in the Unity console states "NullReferenceException: Object reference not set to an instance of an object Inventory.ClearSelectedItemWindow...
7 Dec 2014 by brain tees
You should do some search on this site. Its available hereUnity Player Needs Your Permission To Run In Chrome[^]
26 Mar 2022 by Brownie's Adventures
I made a first person camera using parts of Brackeys Guide, but I have camera moving on both the axis but the line for the xRotation clamp doesnt work when I run the game. How can I fix this? using System.Collections; using...
5 Apr 2014 by CHill60
As no one has come back to you in 3 days can I suggest that you might have more luck on the Unity3d forum[^]
27 Sep 2017 by chino96
I Have a Raffle with Data from a Database, I create two tables one for the players and one for the winners. I want to get the data from the Public Text and use that data to store the info of the winner, using a Public string inputfield. Any suggestion or help or a different approach would be...
27 Sep 2017 by chino96
I just solved with the help of Grame_Grant! I had a T insted of t in the inputfield = txtInput.text this is the final script: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class DataInserter : MonoBehaviour { string...
6 Apr 2021 by Chris Copeland
This is an example of distributing databases and having them synchronise. It's a common practise for applications with enormous user bases (ie. YouTube) to optimise for speed, by having multiple databases available for reads and writes, and...
27 Sep 2017 by CL4Y3R-TR
I tried the following code, but with the following code I can only create random objects on the "x" axis. How to create a random object in the "x" and "y" axes in my 2D game. What I have tried: #pragma strict var theObject: GameObject; var maxXPos: float = 2000.0; var minXPos: float =...
6 Apr 2021 by Cody O'Meara
I have been working on a Unity game for a bit. The database is MySql. I want to create a link between the unity server I have and the website server. So I have an array of servers for my game already. I have another server that I installed...
14 Oct 2014 by CPallini
Try Wikipedia: "Xorshift random number generators"[^].
14 Oct 2016 by CPallini
Buy a book: there are many books available on 3D game development.
27 Sep 2017 by CPallini
Quote: var theNewPos = new Vector3(Random.Range(minXPos, maxXPos), 0, Random.Range(minXPos, maxXPos)); It looks both x and z are random picked. var theNewPos = new Vector3(Random.Range(minXPos, maxXPos), Random.Range(minYPos, maxYPos), Random.Range(minXPos, maxXPos)); Should do the trick (if...
12 May 2021 by Crimson Rayquaza
[code]using System.Collections; using System.Collections.Generic; using UnityEngine; public class Respawn : MonoBehaviour { [SerializeField] private Transform player; [SerializeField] private Transform enemy; [SerializeField]...
10 May 2021 by cyma_1
HI, I want to test my fps controller game with unity3d, but when connected to remote the character controller head rotation is not working neither in remote device or pc. how to fix this? any help will be grateful. Using unity 3d Version...
23 Jun 2015 by Cynni-mii
Hi people,My name is Cynthia and I need some help with Object-oriented programming. I have a project for school where I'am making a 2D platformer game with Unity. Where I have to make a base class and two child classes that inherits from it. I have to work with constructors, properties, etc...
18 Nov 2013 by Dave Kreskowiak
This sounds like the standard functionality of any version (source) control server. Examples include SVN, Git, CVS, Mercurial, TFS, and many others.
10 May 2016 by Dave Kreskowiak
Google for "GPS location smoothing". You're going to get a less accurate location and slower response to your speed changes but you wont' get the jumping around nearly as much.Consumer GPS isn't dead on accurate to begin with because the military owns the system, there are restrictions on...
14 Oct 2016 by Dave Kreskowiak
Seriously, pick up a book on Unity3D and work through it.Your question is broad in the extreme. It's impossible to answer in a forum environment simply because of the vast amount of information that must be conveyed to answer the question "How do I write an entire game?"
30 Jun 2020 by Dave Kreskowiak
C# is case sensitive. gameObject is not the same as GameObject. Change the "gameObject" your have to "GameObject" and the code might compile.
27 Feb 2021 by Dave Kreskowiak
You're probably missing a void return type. public class Identifier { } public somethingMissingHere Update () { if (Input.GetKeyDown(KeyCode.k)) { animator.SetTrigger("sword out"); } }
30 Dec 2021 by Dave Kreskowiak
Nobody looks at the error numbers. The entire error message is important, including the line numbers they occur on. You have to make sure your braces are paired up. Every opening brace needs a closing brace. You should pick a single brace style...
26 Apr 2022 by Dave Kreskowiak
You can Google this all you want. You'll never find the answer, and you don't need to. You just need to look at your own code. Where do you define the return type of a method? What does that say? | | v int testSumArray(int[] numbers = null,...
29 Jun 2023 by Dave Kreskowiak
In C#, an assignment uses one =, while an equality comparison uses two, ==.
7 May 2020 by DaveMathews
Using an on-device bot development framework to integrate a chatbot into unity
15 Aug 2016 by David Dimalanta
I tried using this[^] tutorial from the App Guruz website to observe and point out the errors on not showing the leaderboard UI. Not only the codes but also the plugins as well. (see this link[^] below for more info) By the way, i'm using Unity, making games. After I succeeded in showing...
6 Dec 2021 by Denis Hristov
I am trying to make a Sudoku game in Unity3D but I'm currently stuck on the logic behind the game. (checking if all the numbers in the same subgrid, row and column are different) I have been able to get a script that generates the whole grid...
12 Dec 2021 by Denis Hristov
Hey, I'm making this Sudoku in Unity3D project and I'm currently stuck on making the application check whether or not there are duplicate values in the specific row and column where the number has been inputted. I can provide the GenerateGrid...
23 Jan 2023 by Dev Leader
How to get all the painted tiles on a TileMap when building a 2D game in Unity3D
4 Jan 2015 by developerjm
Has anyone every experienced a problem when viewing the whole game in .exe file that is generated when building the game?I'm am developing a small game part of a project and programmed the game in free aspect. Now When an .exe file is generated, the game isn't shown full, part of the game is...
9 Jan 2015 by developerjm
I'm developing a Unity2D game and randomly coins are instantiated. My question is how to not instantiate the coins on other game objects?Thanks!
5 Mar 2016 by devonJones
If I follow a guide i.e on YouTube, lets say they are creating a 2d platformer on for the PC, will it work for an Android aswell?Was thinking of writing the game in C#New to game development!What I have tried:I've tried looking at youtube videos and looking over the comments...
17 Sep 2013 by dieselc
Is there any way to call CUDAfy.net to Unity 3D ?
1 Jan 2015 by Eduardo Fonseca
Unity3D - Easily Handling Player's Objectives
9 Jan 2015 by Eduardo Fonseca
Unity3D - Basic Gamepad setup
12 Jul 2023 by EgorYusov
This article describes Unity low-level plugin interface and the Unity graphics interface emulator that facilitates native plugin development.
25 Oct 2015 by Ela-Sep
I tried this :if (Input.GetKeyUp ("space")) { rigidbody2D.velocity = Vector2.zero; rigidbody2D.AddForce (jumpForce); if (rigidbody2D.velocity.y > -0.1 && isFalling == false ) { transform.Rotate (0,...
24 Jul 2017 by EmpireWorld
I needed to define a preprocessor directive, that abstracts some conditions. I want to detect platform File I/O support. So i want to define a preprocessor directive like FILE_IO to detect does this platforms supports or not. I needed a preprocessor directive because i can't use File api on...
29 Jun 2023 by Eric Taylor 2023
using System.Collections; using System.Collections.Generic; using UnityEngine; public class EnemyTimer : MonoBehaviour { public float currentTime = 0f; public float startingTime = 10f; public delegate void Enemyspawn(); public...
2 Jul 2023 by Eric Taylor 2023
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Rendering.HighDefinition; public class Floating : MonoBehaviour { public Rigidbody rb; public float depthBefSub; public float...
2 Jul 2023 by Eric Taylor 2023
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Rendering.HighDefinition; public class Floating : MonoBehaviour { public Rigidbody rb; public float depthBefSub; public float...
1 Jul 2020 by F-ES Sitecore
There are lots of differences between your code and the code in the video so go back and follow it more carefully. Unity has a massive learning curve and trying to learn Unity and c# at the same time is doubly difficult. Copying code blind from...
1 Sep 2020 by F-ES Sitecore
It depends what you want to do. If you want to check the objects height then you need to check the y axis value if (transform.position.y > 8f) { Destroy(this.gameObject); } The other thing you might be wanting to check is the magnitude...
31 May 2021 by F-ES Sitecore
If you want the normal angle of the contact you need something like rb.AddForce(collisionInfo.contacts[0].normal * bounce); That gets the normal angle of the first contact, if there are multiple contact points you might need to do some other...
18 Nov 2013 by Frank R. Haugen
Question/problem:I would like a kind of "version control" -system that looks for file-changes and saves copies, so that I don't have both backups and go back and "undue" the projects steps; or branch out from an earlier point in the project.Background:I've started developing in Unity3d,...
18 Nov 2013 by Frank R. Haugen
http://beanland.net.au/AutoVer...
16 Aug 2015 by George Jonsson
Try to change your GameData class and use public properties instead.[Serializable]class GameData{ public bool IsGameStartedFirstTime { get; set; } public bool IsMusicOn { get; set; } public int HighSchore { get; set; } public bool[] Levels { get; set;...
2 Oct 2020 by George Swan
I am not sure what you are trying to do exactly but it seems to me that the switch statement can be simplified. You are checking that ivalue is not zero in every case. Why not test for ivalue==0 just once on the first line of the method and...
14 Nov 2018 by Gerry Schmitz
Any "old" Windows app (including WPF) can run in a "Mixed Reality" environment. Difference is, it can only run as a 2D "panel" (i.e. "window") in the MR space.
11 Apr 2019 by Gerry Schmitz
You should shuffle list2 in the "outer loop" (not before), if you want "combinations within combinations".
30 Sep 2019 by Gerry Schmitz
Try them both. However, having tried them both, I found Unity less "entangling" (regarding connectivity and licensing). So, try it first. There's also more Unitty samples for c# / Visual Studio. Unreal may be more polished, professional and complex. Unity has "form controls". Not sure about...
2 Apr 2020 by Gerry Schmitz
Use Stopwatch to narrow things down. Stopwatch Class (System.Diagnostics) | Microsoft Docs[^]
7 Jan 2021 by Gerry Schmitz
ForceReceiver.AddForce(Vector3...
12 Jan 2021 by Gerry Schmitz
You should follow the example. Unity - Scripting API: Transform.localEulerAngles[^]
12 Dec 2021 by Gerry Schmitz
I assume you know how to iterate an array. In which case, if you use a Dictionary or List to "count" while iterating, you'll know when you have a duplicate (i.e. no existing entry, add the entry; if existing, it's a duplicate.)
8 Apr 2018 by Gigaman1
I’ve found a lot of information on passing parameters from one script to another when a game object is present in the hierarchy. My problem is that my Transform object is created on the fly using Instantiate(myPrefab). Is there any way to access the position of myPrefab game object from another...
5 May 2023 by Graeme_Grant
I popped your question into Google Search: How do I scale the gameobject in unity engine automatically according to the screen size, outside the canvas?[^] It gave me this YouTube video: HOW TO SCALE UI TO FIT ANY SCREEN RESOLUTION IN YOUR GAME...
2 Jul 2023 by Graeme_Grant
I don't do Unity, however, that error in C# usually means that you have not initialised the class before using it. Somewhere in your code you need to create a reference: private OceanE oceanE; and then initialise it: OceanE = new oceanE(); ...
2 Jul 2023 by Graeme_Grant
Best place to ask Unity questions is here: Unity Support Forums[^]
20 May 2023 by Grasshopper.iics, Abhishek Nandy, Moumita Das
Virtual Reality with Unity, Intel Edison and MQTT
14 Feb 2024 by Hailu Worku Obsse
Your script looks good for the most part. However, there are a few things to consider and potentially improve: Input System Integration: You're currently using the legacy Input.GetKeyDown(KeyCode.E) and Gamepad.current to detect input. It's...
28 May 2021 by HardykMahendru
hey, I am working on a game and trying to display the distance covered as the score. But despite the code written and debugged, the score is rising when I am moving to escape the obstacles. I want the score to increase according to the distance...
31 May 2021 by HardykMahendru
Hey, I am trying to make an object that bounces back when it hit the boundaries. Here is the code that I tried running: using UnityEngine; public class NewBehaviourScript : MonoBehaviour { public Rigidbody rb; public bool isBouncing =...
8 Jul 2021 by HardykMahendru
Hey, I have written a wall running script but whenever I am trying to attach it to the main player, it shows this error : - Can’t Add Script - The script don't inherit a native class that can manage a script. What is it about and how can I...
15 Apr 2014 by Hussien Ezzat
well , i'm new in unity and still learning i want to ask about code of how to update object the movement of another object and make them move together ??
10 Oct 2017 by IAmJoshChang
How to create an enemy
10 Oct 2017 by IAmJoshChang
How to set up a weapon
10 Oct 2017 by IAmJoshChang
How to create a character in a first person shooter
10 Oct 2017 by IAmJoshChang
How to create a VERY simple first person shooter
10 Oct 2017 by IAmJoshChang
Survival shooter - tutorial II
10 Oct 2017 by IAmJoshChang
Going through the Unity Space Shooter