There's OnAudioFilterRead, although I think that's per audio source. But it basically lets you write your own audio filter. If there's no audio clip and it's the first filter, then it basically lets you output your own audio data.
thanks, this looks exactly like what I was needing
Anyone got any tips on reducing build times?
[QUOTE=garry;46041769]Anyone got any tips on reducing build times?[/QUOTE]
Not really. I know several ways of reducing compile times in-editor (like fixing all warnings seems to result in very quick compile times, also avoiding any Unityscript files like the plague), not sure about build times though.
[QUOTE=garry;46041769]Anyone got any tips on reducing build times?[/QUOTE]
Old shit but [url]http://docs.unity3d.com/Manual/CacheServer.html[/url] you saw this?
[QUOTE=garry;46041769]Anyone got any tips on reducing build times?[/QUOTE]
As far as I know (and probably something you already know too), the biggest task when building are things like texture/audio compression, so you may be able to do something with that (either compress them pre-build or something - not sure how, or make it so that they're loaded externally from the resources folder after building). Aside from that, the biggest things are lightmapping and navmesh stuff, which I have absolutely no clue about because I have no experience with them.
[editline]asdf[/editline]
That or you're not using #pragma strict on your shaders and you're letting the compiler decide what type all the variables should be, which (depending on your shaders) might be a bit of a drag.
Build them as dll files and use those instead of the plain script files. But i suppose you are allready doing that :p
[QUOTE=Arxae;46042645]Build them as dll files and use those instead of the plain script files. But i suppose you are allready doing that :p[/QUOTE]
Nah, that's not going to make it a whole lot faster. Compiling C# in Unity is already pretty damn fast.
[QUOTE=KillaMaaki;46036166]Every component has a .gameObject property which points to the game object it is attached to (including transform).
*examples[/QUOTE]
Awesome, cheers man! I don't understand all of it, but that's because I somehow wrote my entire flash game without learning getters and setters. I'm watching through all of [URL="http://unity3d.com/learn/tutorials/modules/beginner/scripting/invoke"]these tutorials[/URL] though, so I'll come back and check out your examples once I've got those basics down.
[QUOTE=KillaMaaki;46043246]Nah, that's not going to make it a whole lot faster. Compiling C# in Unity is already pretty damn fast.[/QUOTE]
It's what i read somewhere. He had some numbers with the post too, but i can't seem to find it at the moment.
It would be awesome if unity would just allowed visual studio to build the project and use that build. VS in general builds it much faster then unity (don't know about monodevelop).
I procmonned the compiler. The huge majority of time is spent reading and writing thousands of files to Library/Shadercache/.
I have a problem right now with me being too lazy.
Basically I've been working on a game and now I have to create the map which is 2D but because the map is really long It's boring and I hate doing it.
What do you suggest me do now, because I don't want to abandon the project but this isn't the game I wanted to make either. Also there is another game I want to make and since the game I am working on right now it's not what I wanted to do should I leave the current project for now and do the other one or try to finish the first project first?
What's the easiest way to make font size scale across different resolutions with Unity GUI?
[QUOTE=LuckyLuke;46047188]What's the easiest way to make font size scale across different resolutions with Unity GUI?[/QUOTE]
What I usually do, is check what kind of OS I'm going to work on. If I work for Windows, it's safe to assume that all your games will be played on a 16:10, 16:9 or 4:3 screen. I usually set my Unity to a 1920x1080 screen, then I calculate a float every screen resize.
[code]float screenScale = Screen.width / 1920.0f;
float fontSize = 50 * screenScale;[/code]
Then, of course, the fontSize "50" is 50px on a 1920 wide screen. I usually test this on all the aspect ratios the Unity edit or has by default, and if nothing ends up outside of the screen, it should be fine.
[QUOTE=Cyberuben;46047244]What I usually do, is check what kind of OS I'm going to work on. If I work for Windows, it's safe to assume that all your games will be played on a 16:10, 16:9 or 4:3 screen. I usually set my Unity to a 1920x1080 screen, then I calculate a float every screen resize.
[code]float screenScale = Screen.width / 1920.0f;
float fontSize = 50 * screenScale;[/code]
Then, of course, the fontSize "50" is 50px on a 1920 wide screen. I usually test this on all the aspect ratios the Unity edit or has by default, and if nothing ends up outside of the screen, it should be fine.[/QUOTE]
Thanks, that's perfect.
[QUOTE=LuckyLuke;46047345]Thanks, that's perfect.[/QUOTE]
During projects, I'm usually the only guy that volunteers to do GUIs or Menus :v:
[QUOTE=BoowmanTech;46046242]I have a problem right now with me being too lazy.
Basically I've been working on a game and now I have to create the map which is 2D but because the map is really long It's boring and I hate doing it.
What do you suggest me do now, because I don't want to abandon the project but this isn't the game I wanted to make either. Also there is another game I want to make and since the game I am working on right now it's not what I wanted to do should I leave the current project for now and do the other one or try to finish the first project first?[/QUOTE]
We can't give you an answer. Pick what you feel is right I guess. Maybe pick a smaller project? Are you working on it by yourself?
[QUOTE=BoowmanTech;46046242]I have a problem right now with me being too lazy.
Basically I've been working on a game and now I have to create the map which is 2D but because the map is really long It's boring and I hate doing it.
What do you suggest me do now, because I don't want to abandon the project but this isn't the game I wanted to make either. Also there is another game I want to make and since the game I am working on right now it's not what I wanted to do should I leave the current project for now and do the other one or try to finish the first project first?[/QUOTE]
You can always do it the lazy way, there's always a lazy way. Like make the map just some arbitrary black lines etc. and have an artist do the rest. If you got no artist, that's fine, just keep making the game and eventually someone will take pity on you (if you're a lucker like me).
Also working on 2 games at once is fine, you can afford to get bored of one thing and work on another, just make sure to spend equal amount of time on both.
[QUOTE=garry;46046204]I procmonned the compiler. The huge majority of time is spent reading and writing thousands of files to Library/Shadercache/.[/QUOTE]
this just sounds like unity being unity, although it shouldn't be the case anymore?:
[url]http://blogs.unity3d.com/2014/05/06/shader-compilation-in-unity-4-5/[/url]
it appears that maybe many of your shaders are identical, and changing one of them causes all of them to be recached?
Do you guys compartmentalize when using Unity? I've always structured my code so that you could grab one part from a project and put it in the next. Unity being how it is, I feel it's harder to do as opposed to just coding.
[QUOTE=BoowmanTech;46046242]I have a problem right now with me being too lazy.
Basically I've been working on a game and now I have to create the map which is 2D but because the map is really long It's boring and I hate doing it.
What do you suggest me do now, because I don't want to abandon the project but this isn't the game I wanted to make either. Also there is another game I want to make and since the game I am working on right now it's not what I wanted to do should I leave the current project for now and do the other one or try to finish the first project first?[/QUOTE]
My opinion would be to finish the current project, even if you make a really simple map. Having a bunch of unfinished projects doesn't do you any good.
[QUOTE=miceiken;46050002]Do you guys compartmentalize when using Unity? I've always structured my code so that you could grab one part from a project and put it in the next. Unity being how it is, I feel it's harder to do as opposed to just coding.[/QUOTE]
I just code for now. I don't think future-proof, because I just want to make shitload of money with current project then finish studying.
[QUOTE=Cyberuben;46047358]During projects, I'm usually the only guy that volunteers to do GUIs or Menus :v:[/QUOTE]
I believe I need you again GUI Guy, any reason Unity adds a fuckload of padding to the text in a button?
Even with the text anchoring set to [I]MiddleCenter[/I] it still does this;
[IMG]http://puu.sh/bJOSI/507c7b8901.png[/IMG]
(This is pretty much the reason any menus I've done have been 3D instead of 2D)
[QUOTE=LuckyLuke;46050581]I believe I need you again GUI Guy, any reason Unity adds a fuckload of padding to the text in a button?
Even with the text anchoring set to [I]MiddleCenter[/I] it still does this;
[IMG]http://puu.sh/bJOSI/507c7b8901.png[/IMG]
(This is pretty much the reason any menus I've done have been 3D instead of 2D)[/QUOTE]
Write your own button? Or create a new GUI Style, check which parameters you can set to the button and try to tweak them around. Also check the "Normal" dropdown, maybe it has some parameters set there?
I usually only use GUI.Label() and then add my own style to it using images.
Like I said, you could write your own button and just do an aabb check with the cursor position? The latest two games I made in Unity were aimed for Xbox 360 (because controllers, why not) and thus I wrote my own buttons.
[QUOTE=miceiken;46050002]Do you guys compartmentalize when using Unity? I've always structured my code so that you could grab one part from a project and put it in the next. Unity being how it is, I feel it's harder to do as opposed to just coding.[/QUOTE]
It's funny this has just came up.
After watching a video I realized how awful the structure for my heist game was. In fact, there wasn't any structure. It was constant referencing to other GameObjects.
Decided to completely restart the project to add structure, else it would have just have came tumbling down on me eventually, I think.
Ok so I'm currently working on the wave-defence part of the game, and I was wondering if anyone had any thoughts on how to make it feel [I]engaging[/I]. Currently you can make turrets and other things from resources you've collected and place them around the area (working on the demo right now, where there are two places that the enemies attack simultaneously).
Just wondering if anyone had any thoughts, or anything they've wanted to see in something like this.
Does Unity support xinput properly yet?
Does this thread crash all the time for anyone?
[QUOTE=Shirky;46051586]Does this thread crash all the time for anyone?[/QUOTE]
No problems here.
[code]
try
{
open.Thread();
}
catch ( ForumError err )
{
Debug.LogError( err.Message );
}
[/code]
[QUOTE=LuckyLuke;46050581]I believe I need you again GUI Guy, any reason Unity adds a fuckload of padding to the text in a button?
Even with the text anchoring set to [I]MiddleCenter[/I] it still does this;
[IMG]http://puu.sh/bJOSI/507c7b8901.png[/IMG]
(This is pretty much the reason any menus I've done have been 3D instead of 2D)[/QUOTE]
What's the padding set to on that GUIStyle?
[img]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-09/2014-09-22_20-15-59.png[/img]
Sorry, you need to Log In to post a reply to this thread.