Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

C# is a multi-paradigm, managed, strongly typed, garbage-collected, programming language created by Microsoft in conjunction with the .NET platform.

0
votes
0answers
14 views

How do I point with my straight line the point that moves in the figure “infinite” / “8”?

I need a help for my project. Given a straight line "a" - "b" I have "a" point anchored and "b" can move. I need to make sure that the "b" point of the straight line always points to the "c" point, ...
0
votes
0answers
26 views

How to integrate Skype for Business/Lync 2013/SharePoint in Unity3d?

I am developing a cross platform application that needs following features: VoIP Video Call Group Chat Individual Chat Friends & Blocking System Share a Program/ Desktop Shared White Board Share ...
0
votes
0answers
6 views

Pivot points on animated game objects are messed up

Whenever my 3D graphics designer imports models (created in Maya) that are attached to animator controllers, their local pivot points, as shown inside Unity, are invariably messed up. Here is an ...
0
votes
2answers
50 views

Advanced Tetris Programming

This example of tetris game is more complex than general clones. [to test the link: enter/ctrl for start and c/v/b for movements] As you see from the game it has: Smooth movement Auto alignment of ...
0
votes
0answers
19 views

Need help on monogame screen resolution and intersection

Currently in my game i want trying to move my object towards both x axis and y axis.As I also wanted to put it into center ,I have put a camera.Here is my Camera code- ...
1
vote
1answer
21 views

Unity - Display array of Objects in inspector

I have an array of ScritableObject's, which should only be displayed in the inspector if a boolean is true. How would I do this? ...
0
votes
0answers
10 views

Upload mobile game to facebook playable ads

How do you upload Unity-based mobile games to Facebooks playable ads that launched recently?
0
votes
1answer
40 views

Why won't InvokeRepeating work for me?

I am designing an FPS game and scripted this shooting enemy that is supposed to shoot at the player if he is in the trigger zone once every second, but it just rapid fires and ...
0
votes
0answers
21 views

Does server can use multiple client to play one game? [duplicate]

Hi friend i am running small internet business and i want every one should play high graphics games with there minimum config laptop. this is just my thought even i dont know how to process. i just ...
0
votes
0answers
27 views

How can I call OnHierarchyChange only once when there is a change in the Hierarchy?

I'm using EditorWindow type script and when there is a change in the Hierarchy it's getting to the method OnHierarchyChange but then keep getting there each second/frame nonstop. And I want to do ...
0
votes
0answers
11 views

Problem in GLTF and collada library

I am trying to use collada library to import a 3d model in unity scene at runtime(for desktop application). As per this answer i insert collada files on unity it didn't accept this line (shows an ...
0
votes
0answers
7 views

How to continue receiving Arduino IMU sensor data using Unity BLE Bluetooth Asset?

I'm currently using the Bluetooth LE for iOS, tvOS and Android asset. My issue is with sending bytes from Arduino to the Unity Android app that I made. I can receive data, but then it stops after a ...
0
votes
1answer
41 views

Load 3D model from external directory

I am developing a desktop application that want to load the 3D model from desktop. Using file explorer user wants to choose the 3d model then it want to show in the application scene.I tried to find ...
0
votes
0answers
20 views

Add tiles to both sides of TileMap List in MonoGame

This is what my tile map looks like (red highlighting added for clarity): My code: ...
0
votes
0answers
25 views

Unity movement forward doesn't work as expected

I'm moving my object on a road builded with a primitive plaines, there is also some downhill parth, (like a car that run on a road) here is my script : ...
0
votes
0answers
19 views

How can I move car by Joystick like Death & Really?

I'm trying to move my car by Joystick like this gif: I have Idea to making this system: suppose there is object front of car as carrot.when player move Joystick , carrot will rotate.so car will ...
0
votes
1answer
47 views

How to make a 2D sprite slowly vanish as it crosses a line — as if disappearing behind a wall?

...Except there is no wall. Only one of its edges. Here is what I mean. Notice how the lines "sink" into the center square. I've been trying to do something very similar, in Unity. My approach is to ...
0
votes
0answers
9 views

Unity - TextMeshPro Assembly Reference not being recognized

I'm trying to use TextMeshPro plugin which requires the TextMeshPro library. The problem is, despite the fact that the library includes this reference, it's still not recognized. Using the old TMPro ...
0
votes
0answers
77 views

Why my character is going back when I look down?

I have a camera on my player's head, and I can move around with the keyboard. Other than just moving I also wanted to look around using my mouse. I currently have a script to do so, but when I look ...
0
votes
0answers
9 views

How to change behavior of object by a virtual button with vuforia

I'm really new user for unity and vuforia. I have a cube having properties that are lean scale, lean rotate and lean translate whose are in Lean Touch asset. I have also a virtual button to separate ...
0
votes
1answer
8 views

“SetSelectedGameobject” only highlights button on second try (Unity 2017.3)

To support the use of a gamepad in the options menu I set SetSelectedGameObject and firstSelectedGameObject (which doesn't seem ...
1
vote
2answers
64 views

How should I be loading a player's content and its bullets content later in the game

I'm trying out Monogame because my course has a simple game programming class in it which is just going over basics. The final project will be using Monogame so I've been getting ahead and making my ...
10
votes
7answers
5k views

How best to structure/manage hundreds of 'in-game' characters

I've been making a simple RTS game, which contains hundreds of characters like Crusader Kings 2, in Unity. For storing them the easiest option would be to use scriptable objects, but that isn't a good ...
0
votes
0answers
32 views

Snake movement - follow every body part to the exact path of head

I'm trying to recreate Snake VS Block game on Unity, currently I'm saving snake head position (adding it to the List) on every update, maximum length of list (saved positions) is equal to the snake ...
0
votes
1answer
35 views

How to use seperating axis theorem to allow for sliding along walls

I'm making a 2d platformer game and using the separating axis theorem for collision detection, but i want the player to be able to walk along the ground and slide on walls and other stuff and i can't ...
0
votes
0answers
13 views

LineRenderer Sprite/Default Material Problem?

Hi guys, I am working on adding a smooth material to line renderer but there is a problem with it. If I use sprite default for material my line become jagged. but I want a bit smoothy line. So I made ...
0
votes
2answers
203 views

Too many if statements, How can i take a whole bunch if statements that check 13 separate lists more optimally?

I have a 13 if statements that check 13 separate lists to check if a value is in that particular list. Now surely there's a better way of doing this because I'm going to have to do this 12 more times ...
0
votes
0answers
23 views

Alternative to a collider for representing a horizontal plane

I'm studying with Unity, and now I'm starting to learn stuff without using the pre-implemented components like colliders etc.. Right now I have my player walking on a plane using the following code: ...
2
votes
0answers
26 views

Quest UI Display in Unity 2D

I have this quest manager script where I store all my quests for easy duplication. I'm adding a feature that gives the player the option to see his/her current to-do quest. The first thing I ...
0
votes
0answers
22 views

randomly switching between animations - Unity

I'm trying to add some hit/punch animations to my character, but I can't resolve some issues, first I don't know what's better for my case, bool or trigger, second I dont know how to switch between ...
0
votes
1answer
25 views

Using multiple textures in Monogame HLSL Effect shader?

My Monogame HLSL shaders only successfully sample one texture (besides the screen). Any additional textures I try to sample end up with the same texture data as the screen. I've found people with ...
5
votes
2answers
665 views

Need help deciding on an ability system in Unity

I'm making an RPG and got to the point where I want a player to be able to use abilities. I decided to use a command pattern to keep keybindings flexible and now I've arrived with the following ...
0
votes
0answers
12 views

Changing line thickness when using Graphics.DrawMesh() with MeshTopology.LineStrip in Unity

I'm currently using Graphics.DrawMesh() and Graphics.DrawMeshInstanced() for performance reasons to draw a hexagonal grid. ...
0
votes
0answers
45 views

Why does adding a value to list<> makes list not editable in unity inspector

I am adding elements from the first list to another similar list, but it makes first not editable in the Unity Inspector. Whenever I try to change values from the inspector it makes them again 0. ...
0
votes
0answers
25 views

Fast Input device switch

We want to build a game framework on top of unity. ( Framework to enable fast game creation of Type X in Unity ) Our current goal is to support the "on-the-fly" switch between input devices like most ...
0
votes
1answer
89 views

Is this bad design to have a static class which plays sound effects?

I am trying to make a audio manager. I want this audio manager to setup itself and be accessible from everywhere. So I made a static class that creates the audio sources when you need them. Is this ...
0
votes
2answers
46 views

Display loading screen after scene change but wait for coroutine to finish

I thought I'd understood how coroutines work but I'm still experiencing problems getting them to run when I want them to run: There are two scenes in my game: The main menu one and a game one. The ...
0
votes
0answers
20 views

Why Unity spawning extra object on client side but not on host side?

I Instantiated a Gun for player and also Spawned it on Server using NetworkServer.Spawn() it worked fine in Host both player have their gun but when I connected my ...
2
votes
0answers
33 views

Using C# summary documentation as tooltip in Unity

In unity, I often end up with duplicating the tags for code documentation, and the [tooltip] tags for the Unity Inspector. Is there a way to automatically extract tags into Unity [tooltip]s, or ...
1
vote
0answers
83 views

Are most cross-platform C++ libraries really not cross-platform for game developing? [closed]

Sorry for my poor English. Some cross-platform C++ libraries are useful for game developing, e.g., Eigen, Skia, OpenCV, Tensor Flow. I am not sure whether they are really limited to officially ...
0
votes
2answers
39 views

Adding force to a 3d object in a 2d scene

I have a 3d game object placed in a 2d scene (top-down view) in Unity. I want to add force to the object to move it in the direction it's facing. I attached a RigidBody2D component to it and when I ...
0
votes
0answers
14 views

Swinging the player using hinge joints

I'm prototyping with a grappling hook mechanic in 3D space. I got one function working fully where, if I left click, the hook travels towards an object, and brings the player to a object tagged to be ...
1
vote
1answer
36 views
1
vote
1answer
86 views

anticheat architecture [duplicate]

I have online game for which I wrote a simple external anticheat in c#, it checks my game's process modules and handles for suspicious activity. And so it works like this: player starts launcher (...
0
votes
0answers
36 views

Player choosing their own flag with symbol

I have created a very basic flag sprite, it is a white fabric with a wooden support as the texture. I would like the player to be able to change the colour of the white material to whatever they ...
0
votes
0answers
47 views

OpenGL Ray Transformations

Sorry for my english at first. I have method for ray intersection test and it works. If I apply a transformation to an object, the method does not see it. I think that happens because I'm using wrong ...
5
votes
1answer
609 views

Multithreading MMO Server. A thread per area OK? [closed]

As a personal project, I'm setting up a MMO, and writing the server in C#/.NET Core. As of now my architecture is as follows: The world exists of different areas ( you can go from area to area trough ...
2
votes
0answers
36 views

Sprites being skipped over in simple sprite change script

Each instance of the prefab in question has a copy of this script on it, but they seem to be interfering with each other in some way. I would forego prefabs, except the final game I'm prototyping for ...
0
votes
0answers
12 views

RaycastHit2D collision detection problem?

I want to add a ray to the mouse position and detect the objects with this ray. I made it but there is a problem: ray doesnt collide with objects sometimes. the code: ...