Gangles
|
|
« Reply #40 on: December 15, 2009, 04:54:06 PM » |
|
Select something in the heirarchy, then select the scene window and press "F"... the scene camera should zoom it into focus. That did it, thank you!
|
|
|
Logged
|
|
|
|
Captain_404
Guest
|
|
« Reply #41 on: December 17, 2009, 06:17:51 PM » |
|
I'm not sure if you ever actually dropped the link to sfxr as promised in the video. Or I just missed it.
These are really great, looking forward to the next part!
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #42 on: December 17, 2009, 06:18:55 PM » |
|
|
|
|
Logged
|
|
|
|
team_q
|
|
« Reply #43 on: December 18, 2009, 12:05:14 PM » |
|
Hey Alec! I watched your videos, they rock! Though I was kinda hoping for a 'Unity for Programmers' style one.
|
|
|
Logged
|
|
|
|
Saker
Guest
|
|
« Reply #44 on: December 18, 2009, 12:24:24 PM » |
|
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #45 on: December 18, 2009, 12:26:33 PM » |
|
I wish you focus more on explaining the scripts and how they work in unity . Thanks guys! The next part will be about how all the scripting for that shooter game works, so I think you'll find it interesting.
|
|
|
Logged
|
|
|
|
shrimp
|
|
« Reply #46 on: December 19, 2009, 02:25:40 AM » |
|
So, is there a way to make changes made whilst running persistent?
One way sort of around that is to change prefabs, since those changes are preserved. But I'm not sure if there's a way to save scene changes made while the editor is running. (it would be a weird problem for them to solve, what about all the stuff you wouldn't want to save?) Not that weird, given that it *kept* tripping me up all the way through the tutorials. Surely it can't have just been me? I guess maybe it stops being a problem with experience, but it would just be nice if it was a bit more obvious when it was in "running" state. Though I was kinda hoping for a 'Unity for Programmers' style one.
I thought these were quite programmery. The main questions I have now are how to implement things like gameflow states, managers and stuff that persists between scenes. I read about some "DontDestroy" type flag, but I'm not sure how to organise stuff yet. This stuff might be out of the scope of these, maybe I'll just ask here or on the forums when I get to it. If anyone has a link to this sort of info, please share it! Anyway, great job with this stuff!
|
|
|
Logged
|
|
|
|
biomechanic
|
|
« Reply #47 on: December 19, 2009, 04:40:58 AM » |
|
For people interested in learning Unity - check out the videos from 3D Buzz. Alec, I hope you don't mind me posting it in your thread.
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #48 on: December 19, 2009, 10:22:25 AM » |
|
I thought these were quite programmery. The main questions I have now are how to implement things like gameflow states, managers and stuff that persists between scenes. I read about some "DontDestroy" type flag, but I'm not sure how to organise stuff yet. This stuff might be out of the scope of these, maybe I'll just ask here or on the forums when I get to it. If anyone has a link to this sort of info, please share it!
For persistent managers: You put the object in every scene, but it has a script that destroys the next instance. e.g.: static var instance:MusicManager;
function Awake() { if(instance == null) { instance = this; } else { Destroy(gameObject); return; } DontDestroyOnLoad(this); }
|
|
|
Logged
|
|
|
|
LarderOwl
Level 0
|
|
« Reply #49 on: December 28, 2009, 01:55:54 PM » |
|
What was the sound effects program called? cfx?
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #50 on: December 28, 2009, 02:25:12 PM » |
|
What was the sound effects program called? cfx?
This is the Mac version: http://thirdcog.eu/apps/cfxr
|
|
|
Logged
|
|
|
|
|
|
Alec
|
|
« Reply #53 on: December 29, 2009, 03:16:59 PM » |
|
Oh my, this looks like it could be fantastic. I'm tempted to try it out, but 3D has always been so intimidating to me. Might be worth giving it a shot - and if you end up not liking it, at least you've tried it.
|
|
|
Logged
|
|
|
|
shrimp
|
|
« Reply #54 on: January 02, 2010, 08:29:20 AM » |
|
Hey, thanks for the persistent manager tip - looks quite tidy! Sorry for the lack of reply earlier, I got waylaid by some other stuff before I could do any more Unity, but it's next on my list
|
|
|
Logged
|
|
|
|
hyperduck
|
|
« Reply #55 on: January 02, 2010, 08:53:21 AM » |
|
I feel silly I never thought to look here, great work Alec. Will read in my tea breaks!
|
|
|
Logged
|
|
|
|
Theotherguy
Level 1
|
|
« Reply #56 on: January 02, 2010, 07:29:33 PM » |
|
Oh my, this looks like it could be fantastic. I'm tempted to try it out, but 3D has always been so intimidating to me. Might be worth giving it a shot - and if you end up not liking it, at least you've tried it. Okay, I've started playing around with it, and I can't seem to get C# scripts to work. Whenever I try to add it to an entity in the game world, it complains about the script not sharing the same class as the entity or something. I also can't access the object's rigid body from my script.
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #57 on: January 02, 2010, 07:38:53 PM » |
|
Note: if you're using C#, you won't be able to use my tutorials word for word
For C#, your class has to match the name of the script. (this is setup automatically if you use Javascript/UnityScript)
e.g. if the new script is called "Fred" your class has to be called "Fred"
|
|
|
Logged
|
|
|
|
Theotherguy
Level 1
|
|
« Reply #58 on: January 05, 2010, 05:28:39 PM » |
|
Okay, I got a simple script working with a little sphere that follows the camera around, which is really exciting Now I am trying to get a simple collision sensor working, but I'm a little confused on how Unity handles this. It seems that if I give an object a rigidbody, it automatically gets a collision sensor, but I want to make my own collision sensor that is attached to the object that I can listen collisions from. Just saying something like "SphereCollider s = new SphereCollider();" and then setting its attributes don't seem to work, because SphereColliders don't have public attributes. Am I supposed to make my script extend a SphereCollider if I want to handle collisions?
|
|
|
Logged
|
|
|
|
Alec
|
|
« Reply #59 on: January 05, 2010, 05:58:34 PM » |
|
You just add a collider yourself in the GUI, then set the properties there.
Component -> Physics -> Sphere Collider
You can edit a collider in script either by using
this.collider or just collider
Or you can probably do something like: var sphereCollider = GetComponent(SphereCollider);
|
|
|
Logged
|
|
|
|
|