Questions tagged [unity3d]

Unity, also referred to as Unity3D, is a cross-platform game engine with a built-in IDE developed by Unity Technologies. It is a commercial development platform for creating games, interactive 3D applications, training simulations, and medical and architectural visualizations.

37 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
506 views

Unity3D shader for rendering 2D sprites with a pseudo-glitch effect

I'm making a puzzle game in Unity with sprite-based graphics. When the game is paused, I want to hide most game elements, because I don't want the player to be able to pause and leisurely think about ...
5
votes
0answers
154 views

Multithreaded pathfinding in Unity C#

I've tried to implement multithreaded pathfinding in an attempt to increase performance, but if anything, performance seems to actually decrease when I enable multithreading. Is there anything I ...
5
votes
0answers
122 views

Prototype GameManager for game written in Unity

I am self taught, so I'm consistently seeking ways to code better, and more efficiently. If anyone has the time, please advise me on what can be done better with explanations as to why the old method ...
3
votes
1answer
101 views

Creating a Client-Side Prediction and Server Reconciliation

Preface I have been trying to find out "How to make Client-side Prediction and Server Reconciliation" from scratch with an easy-to-understand code in C#. So I decided to make my own ...
3
votes
0answers
240 views

C# Procedural Mesh Generation Optimization

I'm making a terrain-deformation system in Unity that utilizes the common marching-cubes algorithm. So far I've gotten the system working, employed Unity's job system and burst compiler, and managed ...
3
votes
1answer
83 views

Remove redundancies in similar properties

I have a lot of redundancy here, but I am not sure how could I make it look shorter. ...
3
votes
0answers
39 views

Accurate && precise location data within a timeframe (session)?

Scenario A session would start & end within a time frame. Within this time frame, the device would be moving within a constraint environment. The movement would be extremely slow (slow-walking to ...
3
votes
0answers
47 views

Manage independent script component architecture in unity

I have different set of objects where I have to show Name UI and Menu UI using OnMouseDown and on OnMouseEnter Events. Remember ...
3
votes
0answers
49 views

Procedural Generation

I'm currently working on a procedural generated terrain. I've written the Chunk script, and it works great. When I generate a few chunks in Unity, it runs alright, but it could definitely run better!...
3
votes
0answers
3k views

Unity3D Property Drawer for a MinMaxSlider

This is a bit of an interesting one. Read about custom Property Drawers in the Unity Docs. Read about MinMaxSlider in the Unity Docs. Unity's ...
3
votes
0answers
171 views

Mesh Modifier System in the Unity Game Engine using C#

The system is meant to replicate the deformers and modifiers commonly used in 3D modeling programs like 3DS Max, Maya, Blender and Cinema 4D. I made a post on Reddit, explaining the features and ...
3
votes
0answers
209 views

Splines on Unity3D

I've written this small code chunk to implement a very basic spline system for object motions. As I've only used C# on Unity3D so far I would appreciate feedbacks on this, especially on access levels, ...
3
votes
0answers
245 views

Reading log file of subprocess

I run subprocesses with lot of output (compilation of Unity 3D projects). I use log parsers to find known issues. ...
2
votes
0answers
81 views

How should I go about implementing rust into the unity3d engine?

Recently, I've explored using rust as a scripting language for unity. My current method involves creating a DLL from rust, and loading it into my game at runtime. It requires that the user use a ...
2
votes
0answers
124 views

Is this a good pattern design for a Unity dispatcher for creating thread safe methods?

Well, my intention here is to allow users to execute Unity methods/properties in other threads by using this Dispatcher implementation: ...
2
votes
0answers
130 views

Unity rotator script

I was playing around with Unity's new Entity Component System and I was trying to implement a rotator system. This is what I came up with: Component Data: ...
2
votes
0answers
125 views

Access a variable after several references

I have a team lead that used to write references in a single script then access it in every script. Like for accessing a variable he has to write code in this way ...
2
votes
0answers
755 views

Making a Icosphere in C# and Unity

In Main.cs, which is attached to a GameObject that has a MeshRenderer and MeshFilter: ...
2
votes
0answers
65 views

Generic DialogueBox class with different parameters

I have implemented a DialogueBox class which can be static, singleton, service locator, etc. I have written it as a singleton pattern and implemented it in Unity3d engine. It is a part of a game. I ...
2
votes
0answers
317 views

Unity Generic Pool System

So i'm using this for pooling my gameObjects in game. Every other script can ask for a pooled GameObject using ...
2
votes
0answers
54 views

Task based GameObject recorder for networked game

I've recently been dipping my toes in to async code so I'm not 100% sure if there's a better way to do this, or if I'm going to run into problems down the road. I plan on using the following class in ...
2
votes
0answers
45 views

Getting right model from list

Im not a programmer, but somehow like trying to make something, almost like a hobby. As of now i have made a list of different gameobjects (models) and i need to choose right one from that list. ...
2
votes
0answers
30 views

Unit sprint mesh rendering

I have built this code in the past and I am reviewing it once again. I have a feeling that I could make the code much faster. Could someone please look at the code. What happens is that every time ...
2
votes
0answers
112 views

Z sorting implementation for a 2D isometric game

This is a naive implementation of a Z-sorting in order to fake 3D depth using sprites in a 2D scene. I would appreciate feedback on this, especially for performance as this has to be called each frame ...
2
votes
0answers
7k views

Blocking TCP Client with Threads vs. Non-Blocking TCP Client with Unitys Update

I'm not sure if this is the right subsite of stackexchange because it's not only about code review but a bit about design eihter. I'm currently developing a network application. I need to connect a (...
2
votes
0answers
586 views

Unity post/get/check www requests with success callback and error callbacks

This is a class I built to handle post/get requests to URL's, but also check for connection and provide different callbacks depending on success or failure. It is intended to work without being ...
1
vote
0answers
37 views

Shader for 1-bit color palette + a VFX ramp

I'm making a Unity game with a "1-bit" color palette, a la Downwell - the vast majority of the screen will end up being in black and white, but unlike true 1-bit graphics, some highlights ...
1
vote
0answers
57 views

Unity - Rail Shooter Player Ship Movement Handler

I'm currently learning C# so that I can do some projects with the language. To provide some fun learning I'm also learning the Unity engine at the same time. Currently I'm following a tutorial for ...
1
vote
0answers
22 views

Callee specifying more spectific behaviour of the caller

I am working on a game in Unity/C#. I have a section of code that both feels like the best solution and code smell. There are two objects. A player, and something interactable. The interactable object ...
1
vote
0answers
44 views

Simple Unity program for a research experiment

I'm developing a small C# Unity application to display stereoscopic images as part of a wider research study. Since the experiment consists of unique stages (Start, during a trial, between trials, ...
1
vote
0answers
559 views

Unity Tilemap RandomBrush with orientation and probabilities and fixes

Unity3D.com recently released a 2-D Tilemap system. It comes with a really basic RandomBrush for painting a random tile from a list of tiles. But the tiles were not being saved between preview and ...
1
vote
0answers
37 views

Touch Controls: Assigning Touches to Movable Objects within Rects

My game has a variable amount of vertically placed sectors (fields), each of which contains a cursor that moves up and down along a bar when the player touches within a given field. The sectors are ...
1
vote
0answers
204 views

Grid based inventory

I am trying to create a grid based inventory and so far everything is going well except for one thing. The inventory consists of Grids that are built of ...
1
vote
0answers
105 views

Getting data from a server for raffle game and saving data back to the server

So I'm making a raffle game so when you press B you get a random name with all the information of the winner. I get the data from a local SQL server and I want to make a list of the winners by saving ...
0
votes
0answers
41 views

Two sets of scripts for a Katamari Damacy-style game

I would like some feedback on trying to implement SOLID principles to my Katamari Damacy-style game, I have provided below the 'original' script which accomplished a variety of tasks, and then the '...
0
votes
0answers
56 views

Unity C# CubeController script (jumping & moving the cube)

I'm kinda new to C# and Unity, coming from PHP/Python background. So I'm curious, if this CubeController script can be considered a bad code. I mean the coding style, performance, & overall Unity ...
0
votes
1answer
95 views

Unity Static Singleton JSON Serialisation

I have a static PlayerData singleton which stores all the data for the player (gold, upgrades, heroes etc) but JsonUtility ...