Quantcast
Channel: Questions in topic: "datatype"
Browsing all 87 articles
Browse latest View live
↧

why function datatype i.e. function foo() : int {

I just found an answer on the forum where the guy defines the data type for a function, and returns a value at the end of the function,it goes like this: function MaxValue (intArray : int[]) : int {...

View Article


function that will return the name of the data type of a variable?

Is there some function I can use that will return the name of the data type of a variable? I need to know this so I can call a function out of two functions I made that use different datatypes. I hope...

View Article


Unity iPhone plugin - what data type to use?

I'm integrating Countly iOS plugin with Unity. I'm following http://docs.unity3d.com/Documentation/Manual/PluginsForIOS.html and its example:...

View Article

How to equate (link) 2 different data types?

I've been a bit confused about this for a while now. Say you have a gameobject and a int, and you want that specific game object to be represented as a int id how would you do that? I'm delving into...

View Article

cginc definitions vs Docs

In "Lighting.cginc" the "SurfaceOutput" struct (its elements) is defined using "fixed" datatype, but the Unity documentation talks about "half" datatype. According to the docs, "half" is 16bit, "fixed"...

View Article


Unity API not supporting longs (64 bit int)?

Hi all, I would like to use longs in my game, but I'm running into trouble when I try to use it with the Unity API. For instance `Mathf.RoundToLong()` doesn't exist and neither does...

View Article

Using Short over Int

Is there any noticable benefit to using the short data type instead of an int? Would their be any performance increase or anywhere where they behave differently?

View Article

Storing insanely large numbers

I would like to get input from you on how to store insanely large numbers. By insanely large, I'm thinking of numbers that can go up to 100 zeros. I've read about BigInteger it's not available in .NET...

View Article


How does Unity figure out generic component type as Wall in Project: 2D...

Unity released a tutorial for 2d roguelike game a couple days ago: http://unity3d.com/learn/tutorials/projects/2d-roguelike In the project movement of both enemy and player units are handled by...

View Article


Custom Datatypes for optimization?

**Situation:** I have a three dimensional volume filled with evenly placed nodes. At each node I want to store a few values ranging from 0 to 100. I could use a byte for each value, since using 101/256...

View Article

Development of the shop?

Hi, guys. I want create a simple shop in my game. I have a lot of items. I want create something like arrays with two dates - Price and object and give each objects index array. I'm try using a...

View Article

Managing In-Game Variables of Different Data Types

I am working on a system to track in-game variables in an RPG, which would be used in events and conditions. An example would be: *Bob gives you a quest to kill 5 vampires and also visit a shrine in...

View Article

Arrays with multiple data types C#

So I've heard this trick is pretty great at just handling data storage. And I wanna learn how to use it, but a few things I'm fuzzy on. I've read this answer,...

View Article


Singleton Problem

I'm new to coding in unity and wanted to transfer data from one script to another. I followed the tutorial i learned this from step by step(to the best of my knowledge) and I don't get any compiler...

View Article

Looking for the best datatype for a data storing problem

If i had a bunch of values that were possibly non-linear but ordered: 1, 3, 8, 12 and i added a new one, say 5 whats the best collection type (speed over anything else) that would store it between 3...

View Article


Tracking Turns in Turn Based Game Loop

I'm trying to keep track of what number turn it is in this turn based game I'm building. The game focuses a lot on simulation, and is expected to run for weeks, months, possibly years. Each "turn"...

View Article

How to name a GameObject that is set active

Hi there guys. I would like to know how to name a GameObject that has been set active. To better explain: In this line of code : `GameObject room = (GameObject)Instantiate (availableRooms...

View Article


Monodevelop doesn't recognize Vector3 and Transform (C#)

Hi guys, I have this problem with Unity. I used Unity before, but with JS. Now, I want to create some scripts using C#, yet Monodevelop doesn't recognize Unity data type like Vector3 and Transform

View Article

Setting up a New Data Type - Am I Doing Something Wrong?

In my current project, I'm trying to set up a new data type so I can get a script off a game object and enable/disable it on a keystroke. All of my syntax seems to be correct, except for the fact that...

View Article

How to change the data type used in a slider object?

Simply put, is there a way to change the minvalue, maxvalue, and value fields in a Slider gameobject to be doubles instead of floats? I need the capacity for larger numbers.

View Article
Browsing all 87 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>