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
105 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
483 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
94 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
67 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
67 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
57 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
43 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
76 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
161 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
57 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
40 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
47 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
40 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
40 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
35 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
380 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() { gameObject.GetComponent<Renderer>()....
0
votes
0answers
186 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
102 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
75 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
73 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
68 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
85 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
65 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 ...
0
votes
0answers
41 views

Is there a way to apply euphoria physics (ragdoll) to rigged Sprites in Unity2D?

With euphoria physics I mean the realistic object interaction and freefall as seen in most games like recent GTAs. But I want to do that in 2D. (I am a beginner :P).
0
votes
0answers
43 views

Evaluating ratings to balance weapons

I am developing a text-based battle arena RPG on the web. I'm at the part of development where I need to come up with weapons, and I want them to be balanced, yet I have no idea how to make a formula ...
0
votes
0answers
132 views

How do I change iTween values at runtime?

I am trying to figure out how to run and change the speed of rotation on an iTween path at runtime. I'm trying to code it in Unity5 in C#. I have to rotate a few objects on an iTween path which I have ...
0
votes
0answers
142 views

Snap gameObject to grid tile

I'm making a 2D TD game and currently I have made using quill18 tutorials a simple building system. However I'm trying to have it snap on my tiles as I mouse over them. This is my script applied to ...
0
votes
0answers
88 views

How do I Make an object run along with the the rectangular circle shaped path using iTween in unity 5?

Actually I have to rotate an object using iTween or usnig any other stuff if u know. Its like a betting game which I have to manage at run time. As I have been working on this game and have used ...
0
votes
0answers
23 views

How can I give rotation angle to an object running on iTween Unity5?

I have to rotate an object around a circular track which is a rectangular circle so for that I am using iTween and it is running perfect but the object does not change its own rotation just only runs ...
0
votes
0answers
93 views

LibNoise Perlin.GetValue not returning noise for zero decimal place numbers

I'm using the LibNoise port from C++ to C# and running into problems generating Perlin noise (Unity demo here). For some odd reason integers never generate any noise. In the code below _firstValue on ...
0
votes
0answers
17 views

How do I handle or manage commands which are sent by server in unity?

In my game there are 10 objects which are just started running on play as this is a web player game and betting as well and it requires some socket programming. At run time the commands are sent by ...
0
votes
0answers
124 views

Camera rotation in maze game depending of accelerometer

I'm still newbie in Unity 3D... I'm trying to develop simple maze game. I want to roll my ball through maze, but I have to rotate camera left or right, otherwise the player can't see what's behind ...
0
votes
0answers
252 views

Monogame and winforms - drag and drop images

So I managed to create the form design of my level editor and I embedded Monogame in it using the GraphicsDevice sample. Then I used the PrimitiveBatch sample to draw a black grid 32x32 pixels. Here's ...
0
votes
0answers
58 views

Use Lerp Position and Slerp Rotation together

This is what I try to do, When I click on a UI Element, the camera smoothly rotate (to look at the target) and simultaneously move on top of the target. To perform that I use a two Coroutine one for ...
0
votes
0answers
640 views

AssetBundle not working properly

I am using Unity 5.0.1. I have created the asset bundle of a sprite by selecting the name "img.unity3D" from the dropdown and then running the script : BuildPipeline.BuildAssetBundles ("...
0
votes
0answers
72 views

Enlighten interfering with smartfox user objects

This code is checking if a userID matches any id in a SFSUser List: foreach(GameObject element in connectedPlayers){ if(element!=null) { ...
0
votes
0answers
43 views

Position is not what it should be when attaching fixture

In XNA / Farseer I have something like this: Body body = BodyFactory.CreateRectangle(world, 1f, 2f, 1f); FixtureFactory.AttachCircle(0.5f, 1f, body, new Vector2(0f, 1f)); I have been told that body....
0
votes
0answers
76 views

How Can I Make These Collisions Work Outside Of Unity's Built-In? (C#)

I'm having some trouble working out what's wrong with my code. Basically I want to have my player be able to collide with obstacles it's flying through. So I have an obstacle, and a pathway or two ...
0
votes
0answers
53 views

How should I organize multiple materials?

I'm making a tile-based game, in which many tiles will be of the same type, and so I want to avoid having the same texture for all of them. I'm thinking of having multiple textures for those widely ...
0
votes
0answers
54 views

XNA 2D Tile Baseed Map Collision Messing Up On Inside Corners

I'm creating a 2D Over the head game and the collision system works fine for straight walls and outside corners although not for inside corners. The walls are done by each solid tile having a ...
0
votes
0answers
89 views

How do I extract the UV data from an FBX file?

I've written a FBX file loader for my 3D graphics application. The FBX file was created with Blender and saved in ASCII format. I'm having trouble converting the UV data. In the file is the following: ...
0
votes
0answers
463 views

Unity3D - Unable to attach script to GameObject prefab at runtime

I've got a script that manages a scene browser within my application where I'm hoping to generate a new button instance for each scene found. I've put together a button that I've made into a prefab ...
0
votes
0answers
103 views

How can a text asset be added to an asset bundle using C#?

As far as I can tell assets can only be assigned an asset bundle through the editor. Is there anyway to assign an asset an particular asset bundle in C#? Specifically a text assets? I'm trying to ...
0
votes
0answers
18 views

Problem with cameracliping unity

Hello GameDev Community, i've got a small problem with figuring out a way to do cameracliping in the unityengine with raycasting i got two main problems the first being that my camera flicks ...
0
votes
0answers
181 views

Facebook integration issues

I have a "weird" problem with integrating Facebook in my game. The problem is that i can not see the scores of all my fb friends. (I have a high score panel where i visualize my fb friends best scores)...
0
votes
0answers
54 views

Creating a skinned mesh with SlimDX for DIrect3D9

I'm trying to convert a mesh into a 'Blended Mesh' using the ID3DXSkinInfo interface(wrapped by SlimDX). I am expecting that the resulting mesh contain blend weights but they do not. Here is code to ...
0
votes
0answers
90 views

Update part of dynamic Vertex Buffer. SharpDX

I'm creating application to draw simple 2D charts in a fast way. Updating my VertexBuffer is implemented as below: Device.ImmediateContext.MapSubresource(_signalVertexBuffer, MapMode....
0
votes
0answers
49 views

Cutting shapes out of the terrain

I am trying to use Farseer Physics to cut out shapes from my terrain: // contains all vertices of terrain List<Vertices> terrainVertices = new List<Vertices>(); // makes a crate into ...
0
votes
0answers
46 views

Unity Asset Prefab Bug ThirdPersonController (left rotating bug) Unity 5.1.1f

I've been struggling on this for an entire week. There is a very annoying bug in the ThirdPersonController Prefab. Take a look at this video for better understanding. Once I turned 360° degree I ...