Answer by dubbreak
Just set allow scene objects to false? That will limit it to assets (i.e. not object in the scene). You can determine if an object is a prefab (in the editor not at runtime.. but you are working in the...
View ArticleAnswer by dubbreak
If you mean fix compilation errors: No. If you mean fix logic errors: No. If you mean fix issue relating upgrading from 3.5 to 4: No. Here's a guide for [upgrading your 3.5 code for 4][1]. If those...
View ArticleAnswer by dubbreak
[Megafiers][1] has some physics based modifiers they are adding. I didn't see anything like this, but you could touch base with them. Covering how to do it yourself is beyond what can be answered here....
View ArticleAnswer by dubbreak
There are lots of ways to go about what you're asking. What I'd do (in point form) is: - in the ship collider check if I'm colliding with another ship - if it's another ship, child the shooter one to...
View ArticleAnswer by dubbreak
Two things: 1. Lower the bitrate of the mp3 using a tool (lots out there.. audacity is free and you can do it in there, I think foorbar 2000 does reencoding). A 5mb mp3 should be more like 5 minutes...
View ArticleAnswer by dubbreak
Here's a [tutorial on trigger zones][1]. It even has code to get you started. Basically what you want is a box collider (you can have it on a cube if you want so you can see it during editing, but you...
View ArticleAnswer by dubbreak
Older question but I thought I'd add my experience. I work on a unity 3.5.X project that targets desktop and Android (specifically touchscreen PCs and Android tablets). We use Linq extensively in out...
View ArticleAnswer by dubbreak
Either simulate shadows (i.e. fake them) or find someone with a credit card. You are asking permission to do something illegal. There is no way any Unity rep is going to say, "Yeah sure, use a cracked...
View ArticleAnswer by dubbreak
Dave pointed it out, but it has to be that you don't have something assigned to your public bullet field. In the inspector you have to drag an object (with a rigidbody) onto it in the inspector. Clone...
View ArticleAnswer by dubbreak
You are setting them to equal before you check so they are always going to be equal. In Start() (which happens every time that script is enabled) you are setting the player prefs score to your current...
View ArticleAnswer by dubbreak
As roberbu pointed out you're creating copy of the object you have that script on. But then that object creates a copy of itself and so on and so on. First question is: what are you trying to do? I.e....
View ArticleAnswer by dubbreak
[http://blogs.msdn.com/b/jmstall/archive/2006/09/28/createnowindow.aspx][1] [http://stackoverflow.com/questions/739101/launching-process-in-c-sharp-without-distracting-console-window][2] [1]:...
View ArticleAnswer by dubbreak
Two ways. 1 - The way you are doing it (but hide the window). So each time you want to run a cmd populate a string with the command and run your System.Diagnostics.Process.Start("CMD.exe",cmdText);...
View ArticleAnswer by dubbreak
The issue is you are trying to read the serial port too often and Readline is a blocking read (synchronous and it doesn't return until it either gets characters or times out in which case it throws a...
View ArticleAnswer by dubbreak
Unity Answers isn't to get people to write code for you, it's to help you with issues you run across while writing your own code. I'd suggest you take a look at: [How Can I start Learning Unity...
View ArticleAnswer by dubbreak
Capacity is simply the current capacity of the list before it has to expand again. Count is the right way to get how many items are currently in the list. The framework handles the capacity if you are...
View ArticleAnswer by dubbreak
Your problem is in your first loop. Each time you loops you are reassigning pcs with the one component from that object. It should be something along the lines of: foreach(GameObject go in obj) //for...
View ArticleAnswer by dubbreak
In my opinion. No. I don't see a clear relationship. It's not a good use of polymorphism. Using inheritance for the sake of reusing a few methods that might be the same (so you can use polymorphism) is...
View ArticleAnswer by dubbreak
This might be of help? For my buttons (I use ngui) I have this script added on to them: using UnityEngine; using System.Collections; using System; public class EventButton : MonoBehaviour { public...
View ArticleAnswer by dubbreak
Here's a bit of a [guide][1] Some googling and searching the forums and answers will give you more answers. Don't be surprised if your question gets down voted as this basically falls under the...
View ArticleAnswer by dubbreak
**Step 1.** Use c# so you can define events (JS can only subscribe to event IIRC). **Step 2.** Create an event in your bullet class. public class MuhBullet : MonoBehaviour { public string BulletId;...
View ArticleAnswer by dubbreak
See this question: [Draw calls using same material][1] In short: the sphere has too many vertices to batch regardless of whether they use the same material (if you are using the default sphere it has...
View ArticleAnswer by dubbreak
Swallow the learning curve and learn C#. Why? **1.** There are some things you can do in C# [you can't in Unity Script][1]. **2.** C# is a "real" language you can use outside of Unity. Unity's JS is...
View ArticleAnswer by dubbreak
As Owen said the first part is syncing the start (like you would anything else non automatic, with some kind of remote call). If you want them to look the same set the seed on the partical system to...
View ArticleAnswer by dubbreak
Check the [documentation][1]. Looks as though you may want to use: [PhotonNetwork.isMasterClient][2] I'm assuming the master client is the client that created the room. It can be changed once the room...
View ArticleAnswer by dubbreak
It's a typo of some sort and you didn't copy/paste correctly so it's difficult to say. Maybe the fact you have a dash instead of = ? private Stack leftTiles - new Stack(); If you double click on the...
View ArticleAnswer by dubbreak
Something along the lines of this will do: public GameObject doorOne; public float deactivateTime = 3.0f; void OnMouseUp() { StartCoroutine(TimedDeactivate(doorOne, deactivateTime)); } private...
View ArticleAnswer by dubbreak
You need to look up reflection. [Convert.ChangeType()][1] in specific. The problem with using reflection in Unity is it isn't supported by all platforms (to the best of my knowledge). If it's just a...
View ArticleAnswer by dubbreak
Easy, you don't have a try/catch block around your method. I didn't find the overload constructor for Ping(string), but I assume it's the same as creating a Ping class then doing Send(string) (i.e. it...
View ArticleAnswer by dubbreak
Because the Transforms are by reference not by value. When a new scene loads they all end up null (assuming the Transforms are of scene objects). If you want to keep them around you either need to make...
View Article