Tagged Questions
Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.
0
votes
0answers
13 views
Assign the name of string as name of predefined List
I am making a Roulette game in Unity 5.0. I have a list in C# where I store the bets the player places. I use the following code to retrieve the bets placed by the user. Bets1 is the list which saves ...
-1
votes
0answers
20 views
Unity my loop can access whole value in array but if i take the value manually some value in the array become null
First of all , im sorry if my title is too long and im sorry too if i ask bad question or kind of it but i new to unity and im stuck at this problem , i declared an array called saveint with this ...
1
vote
0answers
33 views
Simple cartoon water shader shoreline
I'm currently attempting to create a cartoon-ish water shader with a shoreline. After looking around trying to find out how other games do it i figured out it has something to do with getting the ...
0
votes
0answers
13 views
How to import .obj file from server without using asset bundle in unity3d
I want to import .obj file from a server on run time in unity3D, read lot of questions/answers but not able to find a suitable solution.
Using WWW in unity I am able to get .png file and store it in ...
2
votes
2answers
79 views
fish tank water distortion Shader for unity
I am working on unity and trying to make a fish tank water distortion Shader effect with the following requirement:
1.its a 2D top down prospective.
2.every object under/in the fish tank has to be ...
1
vote
2answers
35 views
Unity 5 - Place objects in game to closest gameobject
I am making a puzzle game in unity3D 5 for school and one of the puzzles is this: The player (third person) can pick up certain objects (4 objects) and has to place them inside holes in a wall in a ...
1
vote
0answers
30 views
Is there any way pre-calculate a projectile's path where multiple effectors are present?
I have more than just a few PointEffector2D components in my scene and I want to see what path a projectile would take in this minefield of effectors.
I've also recently noticed that if I rotate an ...
0
votes
1answer
27 views
Unity3D UI - Bending/Flexible paper effect
I am a new hobbyist to Unity and I working on a game where the player goes around picking up clues in the form of paper notes to solve a mystery.
So far, thanks to the help I got here, I was able to ...
-1
votes
1answer
35 views
How to enable & disable this option?
How to enable and disable this option only, not the whole object with C# ?
0
votes
0answers
19 views
Per vertex lighting in Unity.
I would want to write a cutoff shader that reacts to lighting and casts shadows from all lights sources, just like a surface shader but with as few calculations in fragment shader as possible and ...
0
votes
0answers
16 views
Unity Mixed Mode Lighting
I have a simple scene where the player can transition from inside a room to the outside world which has a few trees and other objects. The room itself has walls and a ceiling and some rotating cubes.
...
0
votes
0answers
23 views
How to Raycast based on GameObject rotation ?
I've a Gun, and an empty gameobject attached to the gun.
When the gun rotate, i would like to raycast based on the rotating gun, but at the moment the ray goes always forward.
This is my code:
(...
3
votes
1answer
71 views
Does interfacing not work as well when it comes to games development?
I'm currently at the start of a project, and I'm following the wisdoms of my day-to-day career as a C# developer for large web applications.
Currently I have set up a bunch of interfaces. Notable of ...
1
vote
1answer
21 views
How do I rotate, inverting flipping one local axis direction of a game object transform using C#?
How do
I invert my arrow that is pointing Z forward to point backwards? The arrow has it own rotation and position. The arrow is also linked to it´s parent rotation and moving position in space. I ...
1
vote
2answers
67 views
My mesh has holes in it. How do I make those invisible faces show?
I have a mesh. A perfectly normal mesh, without any artefacts at all.
However, when I import it into Unity, there are holes in it.
After going through my UV mapping and normals, they are all mapped, ...
1
vote
1answer
42 views
How do i instantiate a particle system on gameObject destroy?
I have this damage script and I want it to instantiate a particle system...a death effect on enemy destroy. How do i add that to this script, please?
using UnityEngine;
using System.Collections;
...
1
vote
0answers
44 views
Designing Game Items in Mystery Game
I am currently working on a Mystery Game, where the player has to evolve in a small hamlet and find clues to solve a mystery.
The game is a first person view and the feel is going to be somewhere ...
-1
votes
1answer
47 views
Null reference exception any time I try to access an array member, referenced from another class
I'm not sure what's going on. The error is coming from something like that very bottom line. I feel like I've tried a million different things and I'm at a loss. Any sort of data that I try to access ...
0
votes
0answers
36 views
Tree-like data structure
What data structure would you recommend me to utilise?
What I need to achieve, is some sort of tree with branches of different and unknown length with strings as keys and strings at the ends.
...
0
votes
1answer
26 views
Combine different game worlds and characters
There is a lot of open source games out there. Each one has its own world and character created. Usually they are created over different game engines too (unity or unreal, etc...). I am wondering if ...
0
votes
0answers
28 views
Transitioning to game developer as web developer [on hold]
I currently have been developing web applications for 2 years; however, I've been thinking of transitioning to becoming a game developer to develop games on unity3d platform and for AR/VR headsets. My ...
0
votes
1answer
62 views
Synchronization between server's value and the one showed in a stat bar (health, stamina, mana…)
I am trying to implement a stamina system for my mmo. In few words, I computed everything on the server that then notifies the client. On the client I have a stamina bar that shows the stamina amount. ...
0
votes
0answers
6 views
Avoiding sttutering or sinking when Collision between trigger and kinematic body occurs
I'm doing some tests trying to avoid the use of raycasts. I'm trying just to let a box fall (kinematic body), and make it stand on another big box (floor). You can think it as a player colliding with ...
1
vote
0answers
50 views
+50
How to force play area corners to Lighthouses in Unity
I'm working for a guy that wants to recreate real environments in VR and superpose them for business demos. Think of one of those mall kiosks where you "enter virtual reality" and at first it looks ...
0
votes
1answer
27 views
How to reference a GameObject that shares position with gameObject in Unity C#
Well, thats a weird title. What i am trying to do is identify the object which position matches the gameObjects position that the script is attached to.
Hell, that didn't make it better.
Here's my ...
0
votes
0answers
18 views
Masking part of the isometric background with different layer
I have isometric background set in layer -1. All is drawn in the background image. There are no separate assets. Player is set in layer 1.
I would like to make upper part of the cube to be in layer 2 ...
0
votes
1answer
13 views
Forcing Proportion Lock on Layout Element
I'm trying to develop a Card-Game in Unity3D using 2D mode.
Every Card GameObject on my Scene contains a Layout Element Component with following parameters:
The parent container, a Panel has a ...
0
votes
1answer
28 views
Unity Matrix4x4 to rotate a point around a pivot / axis
I need the Matrix4x4 to rotate around a given axis that does not go through (0,0,0). Is there some built in straightforward way to do this in the Unity libraries, or do I need to build and maintain my ...
-3
votes
1answer
61 views
What is the difference between OnCollisionEnter and OnTriggerEnter?
What is the difference between OnCollisionEnter() and OnTriggerEnter()? They both seem to do the same thing. What is the better choice to use for my game?
1
vote
1answer
40 views
Game launcher / updater download delta diff
I'm making a launcher for my game (using Unity3d).
I want it to have the following features :
Compare game version to latest version and update if necessary
Check files integrity and update if ...
3
votes
1answer
51 views
Best way for first person view to look at a note/item and add it to inventory?
Implementation question from a beginner. I would like to implement a functionality to a first person game where the player can pick up notes lying around and have the note align itself to the camera ...
0
votes
1answer
29 views
Animation inside GUI
Good day.
I would like to create a "rich" GUI for my game.
How can i add a 3d model to a GUI Button (with continous rotation ) ?
If I can't add a 3d model to a GUI button, what is the best way to ...
0
votes
0answers
19 views
Vertex count increases after importing FBX in to Unreal Engine 4 and Unity
I have imported some static meshes in both Unreal Engine 4.14 and Unity 5.5, which were created in Maya 2014 and Max 2014, and exported from Max 2014. The UV's were mapped for each mesh. The mesh was ...
0
votes
2answers
42 views
Most efficient way to create/modify terrain in real time?
In my game players can modify terrain in real time, but I am not sure what is best practice for this scenario. I have redesigned and refactored the way the player does this a few times, and am ...
-3
votes
1answer
23 views
Unity Array Index Is Out Of Range When Comparing Normal Variable With Array Variable
I created a script that used to check all number at mesh.triangles and save the value if we did not save it yet to array variable that i created manually in script , but before the script even go ...
1
vote
0answers
20 views
Best way to add animated sprites to canvas in Unity
In have a 3D world map, and I want to have a 2D UI with top nav/character thumbnail/stats/etc. overlaying it. I figured the best way to do this would be to use a canvas an embed all of UI stuff on it. ...
1
vote
1answer
53 views
Pixel Perfect Camera
I'm trying to get the camera pixel perfect in my game. I have tried the solution described in this video: https://www.youtube.com/watch?v=eN1zV0hlkso&t=7s
I use the resolution 128 by 72.
Set the ...
1
vote
2answers
38 views
Unity Rotations not working properly? Help
everyone. I'm experiencing a rather annoying bug and I was hoping someone could offer some help because this just isn't making sense to me. The Ballistic script tells the bullet to move in its forward ...
3
votes
1answer
65 views
Minigame inside game in Unity
I am developing a 2D game, and using an option of the game, it will open a minigame. I planned to set it as a separate scene, but I don't know how could I load a Scene into another scene as a window.
...
7
votes
1answer
1k views
Is it wrong to be creating new objects in Update()?
I'm using Unity and sometimes I'm using th new keyword in Update, like new Vector3() etc...
I wonder is this causes memory leak? I mean in every frame a new Vector3 is created. If this is the way of ...
0
votes
1answer
37 views
how do you add W, A, S, D controls to unity 5.5
I have a character already in the game files and just need to know how he can move I have looked online in lots of places and it just doesn't make sense to me as I am sorta new to the game development ...
3
votes
0answers
18 views
Execution order of uGUI events in Unity?
I'm trying to understand how UI events fit into the overall Unity update loop. Specifically, I want to manually call onClick via script, and then modify the effect of that event within the same frame.
...
5
votes
0answers
67 views
how to Send voice over unity networking
I am able to record and run audio from my microphone using this code snippet
void OnGUI() {
if (GUI.Button(new Rect(0, 0, 100, 20), "record")) {
// Microphone.End(Microphone....
0
votes
0answers
9 views
Photon Unity: Variable doesn't sync using PunRPC
I'm building a multiplayer game that needs to know how many players are in the game to assign the player number when someone new joins, spawn him in a certain place, etc.
This is how the Inspector of ...
0
votes
1answer
95 views
A* Implementation broken?
I tried implementing Wikipedia's version of the A* pathfinding algorithm, but when I run it in Unity the object which the script is applied to does nothing and Unity ends up taking 15% of my CPU. I ...
0
votes
0answers
9 views
Composite Prefab color change has no effect
I have a mix of simple prefabs (e.g. cubes) and composite prefabs (e.g. made of 2 cubes).
When I try to change the color of the simple prefab using this:
simple.GetComponent<Renderer>()....
1
vote
1answer
19 views
Unity-Help with RaycastHit2D.hit.normal
I'm working on a little pong clone and trying to implement collisions using triggers.
I have a ball which OnTriggerEnter sends out a raycast from the ball's position towards its velocity. I then take ...
0
votes
1answer
14 views
How to select multiple frames from a sprite sheet in unity
I have a sprite sheet and cannot figure out how to select multiple frames in unity 5.5 I am watching a tutorial and it doesn't say how to do it. Is there a button I have to press while clicking or is ...
1
vote
0answers
14 views
Having the same camera in all scenes
I have 100 scenes, each scene has a camera, but I want only the camera from scene 1 to exist in each scene that I appear in.
I use the function DontDestroyOnLoad() to make the camera exist in each ...
0
votes
1answer
29 views
How to display a text in the impact point position
In my 3d game, i would like to display a text 'near' the impact point of a bullet.
I think i'm having problems setting properly text position.
This is my code.
The script is attached to an object ...