subscribe via rss

Posts Tagged ‘Unity3D’

WP Greet Box icon
Hello there! If you are new here, you might want to subscribe to the RSS feed or Join Us for updates on Indie Game Development, Game Industry News, Unity 3D and more!
11 Mar 2010

[Unify Wiki] EncloseTerrain

Author: Unity3D News Pipe | Filed under: Technology

Summary: New page: == Description == An easy and quick script for encapsulating your terrain in a wall. Future: More advanced versions to come... <csharp> /* * Written by: Matt Greene (aka Deis) * Last ...


== Description ==

An easy and quick script for encapsulating your terrain in a wall.

Future:
More advanced versions to come...

<csharp>
/*
* Written by: Matt Greene (aka Deis)
* Last Revision: 3/11/2010 12:50 EST
*
* A very simply script for encapsulating your terrain
* in a wall. I suggest combining this script with others
* such as the Terrain Toolkit and blending.
*
* NOTICE: You need to manually set your Height and Depth
* in this script for now.
*
*/

using UnityEngine;
using UnityEditor;

public class EncloseTerrain : MonoBehaviour
{
// The desired height of the wall
public static float EncloseHeight = 5;
// How thick the wall needs to be
public static float EncloseDepth = 10;

[MenuItem("CONTEXT/Terrain/Enclose")]
[MenuItem("CONTEXT/TerrainData/Enclose")]
[MenuItem("Terrain/Enclose")]
public static void Enclose(MenuCommand command)
{
TerrainData terrainData;

if (command.context is TerrainData)
terrainData = (TerrainData) command.context;
else if (command.context is Terrain)
terrainData = ((Terrain) command.context).terrainData;
else
terrainData = Terrain.activeTerrain.terrainData;

Undo.RegisterUndo(terrainData, "Enclose Terrain");

EditorUtility.DisplayProgressBar("Enclose Terrain", "Initializing", 0.0f);


int w = terrainData.heightmapWidth;
int h = terrainData.heightmapHeight;
float size = terrainData.size.y;
float[,] heights = terrainData.GetHeights(0, 0, w, h);

for (int x = 0; x < heights.GetLength(0); x++)
{
for (int y = 0; y < heights.GetLength(1); y++)
{
if (x < EncloseDepth || x > w - EncloseDepth)
{
heights[x, y] = EncloseHeight / size;
}

if (y < EncloseDepth || y > h - EncloseDepth)
{
heights[x, y] = EncloseHeight / size;
}
}
}

terrainData.SetHeights(0, 0, heights);

EditorUtility.DisplayProgressBar("Enclose Terrain", "Finalizing", 1.0f);
EditorUtility.ClearProgressBar();
}
}

</csharp>
9 Mar 2010

[Unity Technologies] Unity 3 coming soon!

Author: Unity3D News Pipe | Filed under: Technology

In the Unite 2009 conference keynote we promised you that Unity would be picking up speed, and it has: Unity has become a powerhouse in the game industry and beyond. Nobody else is as active in democratizing sweet game technology to as many developers, and enabling them to target as many consumers. Unity has been used by well over 100,000 developers of all shapes and sizes to create thousands of games and other interactive 3D content that has touched over 40 million people.

We’re moving fast. Our engineering team now consists of 36 people (up from some 12 or so a year ago), and they are firing on all cylinders. We’ve continually released major updates with tons of features over the last years. We also started working on an Xbox 360 port, and recently blogged that our iPhone team is working on iPad support.

But those teams are just a handful of our people! So what else have we been up to? Thousands of code check ins have been done, many subsystems reworked, leading technologies integrated in Unity, and a massive automated testing suite implemented so that we can move as fast as we can.

In fact, here’s a historical graph of our code checkins:

Unity development progress

As a project grows developers tend to check in less frequently, so the actual slope of work being done is much steeper.

Until today it was all hush-hush, but now we’re finally ready to announce our plans. Let it be known: for the last year we’ve been working on the next major release: the uber-cool Unity 3: unity3d.com/unity/coming-soon/unity-3

unity3

So far the only time frame we’ve promised is “summer 2010″, but we’ll be giving early beta access – and a discount – to anyone who pre-orders.

Also, we’ve just announced that Unity will add support for iPad, Android, Xbox 360, and PS3! That’s the kind of “author once, deploy anywhere” that has remained a developer’s wet dream for years. And not just from “one codebase”, but from one heck of a unified and polished IDE paired with the industry’s best asset pipeline!

I hope you’ll stick around with us, we’re only just getting started!

PS. Because we’re unifying the core Unity products with Unity iPhone (and all the other deployment targets too) the upgrade rules are a bit complicated and we haven’t done the best job at explaining them. We are working on this, please bear with us as we are inundated with questions – we will sort this all out and make it as clear as it can be in the near future.

9 Mar 2010

[Unify Wiki] Xbox360Controller

Author: Unity3D News Pipe | Filed under: Technology

Summary:


This page will serve as a cross reference between unity and the xbox 360 contoller keys/axis.

[[Image:X360Controller.png]]

'''Buttons'''

Button sensitivity should be 1000


A = button 0

B = button 1

X = button 2

Y = button 3

Back = button 6

Start = button 7

LB = button 4

RB = Button 5


'''AXIS'''

Analog Axis sensitivity should be 1, digital should be 1000.


D-Pad Horizontal = 6th Axis

D-Pad Vertical = 7th Axis



Left Analog Horizontal = X Axis

Right Analog Vertical = Y Axis


Right Analog Horizontal = 5th axis

Right Analog Vertical = 4th axis

Triggers = 3rd Axis

even though they are analog, unity only detects them as digital (-1,0, or 1)


--[[User:Ramen-sama|Ramen-sama]] 17:58, 8 March 2010 (PST)
8 Mar 2010

[Unify Wiki] FindMissingScripts

Author: Unity3D News Pipe | Filed under: Technology

Summary: New page: Author: SimTex with slight tweaks by Clement == Description == Allows you to add a search a project for all instances of missing mono script. == Usage == In the editor, a script that ha...


Author: SimTex with slight tweaks by Clement

== Description ==

Allows you to add a search a project for all instances of missing mono script.

== Usage ==
In the editor, a script that has been assigned to an object, but subsequently deleted has the string "Missing (Mono Script)" where the script class/filename should be.

It is possible to search a project to find all missing scripts using this editor script. To use it, save the file as "assets/editor/FindMissingScripts.cs". Not that it is important to save it into the editor directory.

Next for each level in your unity project, run the script. It's located under the window menu.

== C# - FindMissingScripts.cs ==

<csharp>

using UnityEngine;
using UnityEditor;
public class FindMissingScripts : EditorWindow {

[MenuItem("Window/FindMissingScripts")]
public static void ShowWindow()
{
EditorWindow.GetWindow(typeof(FindMissingScripts));
}

public void OnGUI()
{
if (GUI.Button(new Rect(0.0f, 60.0f, 100.0f, 20.0f), "Find Missing Scripts"))
{
GameObject[] go = Selection.gameObjects;
foreach (GameObject g in go)
{

Component[] components = g.GetComponents<Component>();
for (int i = 0; i < components.Length; i++)
{
if (components[i] == null)
{
Debug.Log(g.name + " has an empty script attached in position: " + i);
}
}
}
}
}
}

</csharp>

[[Category:Editor Scripts]]
[[Category:C Sharp]]
8 Mar 2010

[InfiniteUnity3D] 0062 Unity (keyboard Bind)

Author: Unity3D News Pipe | Filed under: Technology

8 Mar 2010

[InfiniteUnity3D] 0062 Unity_project8 (assignment).mov

Author: Unity3D News Pipe | Filed under: Technology

8 Mar 2010

[InfiniteUnity3D] Dark Unity Demo of Unity 3 Deferred...

Author: Unity3D News Pipe | Filed under: Technology

Unity Game Engine Version 3 has arrived!

8 Mar 2010

[Unify Wiki] REPL

Author: Unity3D News Pipe | Filed under: Technology

Summary:


This is a tool to give you a Read Eval Print Loop in Unity, based on [http://www.mono-project.com/CsharpRepl Miguel De Icaza's tool].

Caveats: At present there's no edit history, neither variables nor output history survive assembly reloads, output formatting is weak and not all output sources are captured gracefully and -- well, there's quite a lot of caveats but the tool is entirely usable and useful!

[[Image:REPLScreenshot.png]]


== The Code ==

Import this package into your project and go to Window -> REPL -> Shell.

[[Media:REPL_20100308.zip]]

Or [http://github.com/MrJoy/UnityREPL grab the repo from GitHub].