C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.

learn more… | top users | synonyms

0
votes
0answers
41 views

My Movement Function is working good but called only once

I have a function, It's working but not getting called every frame if It's in canMoveDown function but !canMoveDown its not. if (!canMoveDown && UpdateTilePhysics(currentBoardPiece)) like ...
0
votes
0answers
27 views

Why does Intel Graphics Monitor crash after I set a depth stencil state in my Direct3D 11 application?

I'm programming a managed Direct3D 11 application with SlimDX. I want to use Intel Graphics Monitor to capture draw calls for a single frame. When I try to set a depth stencil state my application ...
0
votes
0answers
44 views

How to create a ghost mode to replace Human character 2D platformer

I am making a 2D platformer with a character that requires a player to go through a few obstacles to reach the finish line. I want to make it so that after a few tries and obtaining a set of input ...
0
votes
0answers
87 views

Unity 5.3 Asynchronous Texture Upload in C#

I want to load textures asynchronous in C#. I heard it that it is possible to do it in Unity 5.3. However documentation doesn't mention how to do it in C#. Does anyone have an idea how it works? ...
0
votes
0answers
21 views

Removing the little box from a toggle button

Hello everyone I've this toggle button: public Texture2D togglebutton; hydro.t1Bool = GUI.Toggle (new Rect (25, 155, 100, 50), hydro.t1Bool, togglebutton); everything is fine, in my scene I added ...
0
votes
0answers
74 views

Unity3D freezes when running a project with webservices for the second time

This is a strange one and I've been trying and searching for a solution for days now. I have created a simple webservice that queries a local MYSQL database and returns the result for the client. ...
0
votes
0answers
61 views

Unity: How to create tiled sphere?

I want to build a simple random planet generator and thought of using tiles to generate the surface. I googled for hours, but I couldn't find anything helpful. At least all things I found didn't work ...
0
votes
0answers
15 views

Displaying a timer ontop of a duplicated gameobject? (Unity2D)

So I have a timer which has for example 30 seconds and when it's over it destroys my gameobject. I can make I wonder how can I take this timer and display it ontop of every one of these gameobjects? ...
0
votes
0answers
61 views

MonoGame RenderTarget2D mipmapping fades textures when zooming out

I recently ported my XNA game to MonoGame. Unfortunately, some of the textures are being faded when: They are scaled-down from 32*32 to 16*16 When the camera zooms out, the texture fades from ...
0
votes
0answers
59 views

Lock Z axis from the gyroscope rotation [UNITY 3D]

Here's the code I use. public class CameraGyro : MonoBehaviour { private float initialX; private float initialY; private float initialZ; // Use this for initialization void Start () { ...
0
votes
0answers
58 views

Unity crash on iOS - GameObject.SendMessage()

Unity Version: 5.3.2p2 It's crashing from within Unity's internal code when doing a GameObject.SendMessage() call, it should be noted that this particular line itself is not the source of the crash ...
0
votes
0answers
33 views

Clarifications about usage of delegates, events and coroutine in a Unity script

So, the question is a bit broad, but I need to clarify my ideas about how to use proficiently such tools. Background: I am writing a simple demo that basically does what simcity does: it start a ...
0
votes
0answers
30 views

List derived class serialization

I have an extremely simple ObservableCollection<T> implementation using [Serializable] public class ObservableCollection<T> : List<T>, INotifyPropertyChanged {...} in Unity3D with ...
0
votes
0answers
41 views

Use Same Animation To All Object Having Diffrent Position

I am new in unity. create one animation to the object and create 10 duplicates of same object. I want to apply Same animation to the all objects without starting animation at the same time and without ...
0
votes
0answers
67 views

2d Lighting over Sprites in C#

I am currently working under a project , a small application where i have to implement 2d lighting . For example , in the GDI+ canvas , a image will be drawn and i will have to put a lighting effect ...
0
votes
0answers
49 views

C# Launcher - C# Server Authentication

I know this topic is covered a ton on here, but I am having trouble getting a grasp on what tools to use in order to achieve this task. I built a simple game launcher in C# and plan to have a C# ...
0
votes
0answers
149 views

Game loop architecture using WPF(MVVM) and C#

Could i get some suggestions on how to implement a game loop whilst using WPF(MVVM) and C#, I am a professional developer and understand the technology well. The game loop usually contains a Init(), ...
0
votes
0answers
36 views

Custom bitmap font in XNA 4

Hy, brains. I'm making custom bitmap font processor and have a trouble with correct rendering. In details I have a font presented as png tile map with white characters on magenta background and I draw ...
0
votes
0answers
30 views

Animation bugging out and returning to idle state whilst moving - Unity 5

So my problem is this, my character, when moving side to side is fine and all animations play out fine. But when moving up and down he glitches back to his idle state. I have it set so that when ...
0
votes
0answers
28 views

change button text using reference to gameobject

I have a GameObject that stores a Button prefab. How can I tell the instance of the GameObject to change its text? My code below fails on the commented line below with the error: ...
0
votes
0answers
15 views

storing/retrieving values in dynamically created button script

When I click the button why is the logged text not minion 999 (which is the values I passed in bc.Setup())? When I click the button it outputs the default text of test 6 main.cs using UnityEngine; ...
0
votes
0answers
25 views

Trying to do skeletal visualization in bind pose similar to blender with octahedral mode

I already achieved drawing octahedral by just porting blender code to c#+opentk. Here ported code: static float[][] bone_octahedral_verts =new float[6][] { new []{ 0.0f, 0.0f, 0.0f}, new []{ ...
0
votes
0answers
35 views

“following” Object not Interacting with the game world correctly

So I finally have my object detecting the distance between itself and the player. If within range, the following enemy will chase the player down and touch it. (This will kill the player) However, ...
0
votes
0answers
45 views

Hide (and show) Unity window using C#

I'm making a game (in Unity3d) that features a level editor. However, the editor is made in XAML (i use WPF on Windows Desktop). In Windows Phone, the Editor is a separate application, and i use URI ...
0
votes
0answers
25 views

how to pin down a sprite partly in unity?

I am working on a simple do not let the bombs hit the floor game for android. You control a stick which can rotate to left or right depending on where on the screen you touch (left or right). But I ...
0
votes
0answers
24 views

Unity Need Help With TouchControl

Just finished a simple game in windows,the commented out lines in Script works fine as intended in windows,however in android the controls felt bit wierd so modified the Script,but now the character ...
0
votes
0answers
84 views

crop a texture in unity

I am working on cropping a texture in unity. I have a button,when I click on the button,its takes the photo and the photo get saved to a folder in the phone. But when taking the picture I want to ...
0
votes
0answers
16 views

Buttons duplicated on game scene

I have this set of buttons in a monobehaviour class: public GUISkin btnskin; public Texture2D emptyTex; public Texture2D fullTex; public Vector2 pos = new Vector2(20,40); public Vector2 size = new ...
0
votes
0answers
385 views

Face Detection in Vuforia Unity Android

I am working on face detection in unity.I have tried out a face tracking sample from the below link.It worked fine https://github.com/marcteys/unityFaceTracking The problem is that,when I runned the ...
0
votes
0answers
79 views

Unity Player Smooth Left - Right Movement

I am learning Unity 3d . Now I want to move the player object (The Ball) , Left and right by Left Arrow and Right Arrow key . I want smooth movement when the player goes left , but I don't know how to ...
0
votes
0answers
62 views

transform.Find() doesn't find the specified object

I am learning Unity and C# and I've hit a wall trying to use the transform.Find() function. I am following Brackeys' tutorial for 2D platformers (https://youtu.be/m-J5sCRipA0?t=10m53s) and using the ...
0
votes
0answers
65 views

Custom game loop entirely in the Update method

I am attempting to implement a custom game loop in XNA/Monogame. I know that one can re-implement the Game class using WinForms (with the caveat of having to also redo the content manager, etc.). I ...
0
votes
0answers
52 views

Apply Pixel Perfect by script in Unity?

How can I apply Pixel Perfect by script in Unity? All I could find on the web is this which does help at all..
0
votes
0answers
42 views

Turning a game into a server-client game

I'm redoing a game i wrote in XNA to Unity. The XNA game was the client to a server I wrote as a console application. How does Unity work with a server exactly, and how do you set that up?
0
votes
0answers
56 views

How to pass a java string variable from android activity to unity3d C# script variable?

Require some help to pass custom autogenerated text from android activity to unity3d activity being started.
0
votes
0answers
145 views

Update the Android Gallery after take a screenshot from android device using unity3d

Currently we are working on "Update the Android Gallery after take a screenshot Here follows our issues: The problem is that we are having a button,when we click on the button the photo gets saved in ...
0
votes
0answers
56 views

How can I record and play curves in Unity?

I need record and play curves for playback in My game. for example:I want always record xposition curve(for 50 frame) and when game over happen curves will load. public AnimationCurve ...
0
votes
0answers
38 views

How to create custom editor script only for one field of an object and leave the rest default in Unity?

I have a script attached to a game object. The script has many public fields and I'm satisfied with how Unity displays most of the fields for editing in the Editor. Except for a few. I'd like to write ...
0
votes
0answers
45 views

C# - XNA blurring tiles despite using PointClamp SamplerState

I´ve a problem drawing isometric tiles without getting pixel issues. The way I do it is the following: SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, ...
0
votes
0answers
36 views

How can I create a character for a 2D platformer in Farseer Physics 3.5?

I want to create a similar character like in this tutorial. http://www.madgamedev.com/post/2010/09/09/Article-XNA-Farseer-Platform-Physics-Tutorial.aspx But the tutorial doesn´t work for Farseer ...
0
votes
0answers
37 views

How do I set an array of matrices in HLSL?

I'm trying to render skinned meshes using Direct3D9 and HLSL. I am getting unexpected results due to the transforms that are bound to the shader. I am using PIX to view the constants and the values ...
0
votes
0answers
34 views

Problem with collision between two farseer bodies

I have four different bodies. Ground, rectangle, red ball, white ball. The rectangle and the ground are static. Just the balls are moving. The red ball can´t move through the rectangle, but the white ...
0
votes
0answers
363 views

Unity 3D - Changing emission color in realtime after export doesn't work

I am using the following code to change material's emission color in realtime: Color selectionColor = new Color(0.3f, 0.2f, 0.0f); void Start() { ...
0
votes
0answers
177 views

First person view camera control using joystick in Unity3D

Can anyone give me any tutorial about how to program a first person camera control using joystick in unity3d? I've been searching for this for a long time and I'm out of depth unfortunately. I only ...
0
votes
0answers
99 views

Unity 5 2d array for storing game objects and their data

I want to have a 2D array which has a number of rows relating to the number of game objects and 3 columns. I want each row to have the name of the game object and its position and velocity. Is this ...
0
votes
0answers
72 views

Unity C# event handler not triggered

I am trying out a system in my game in which I have 3 classes: EventService: MonoBehavior EventStore (a normal c# class) EventViewController: MonoBehavior EventStore registers some callbacks to ...
0
votes
0answers
71 views

How do I use Bezier Curves in unity?

I have to rotate few objects on an ellepsoidal(Capsule shaped) track and at the run time speeds are assigned to the objects from the server as this is a betting game which I am developing in Unity 5 ...
0
votes
0answers
64 views

State Machine help

I'm using a state machine for my enemy's AI. I've not worked with state machines before & followed Unity's live training on State Machines. I added a HitState to handle animation sequences. The ...
0
votes
0answers
81 views

How do I rotate an object on iTween path on a curved track in Unity 5?

I have 10 objects which I have to make run on an ellipsoidal track for which I am using iTween PutOnPath. The objects are running on the track but as the curved track comes the objects do not rotate ...
0
votes
0answers
58 views

How to change the Gameobject on a button click

Suppose I have a three gameobject(g1,g2,g3,g4,g5) and I have two button Next and previous.Suppose when i click on next button from g1 the object should move to g2,when i click on next button again it ...