Unity3D

A* Pathfinding compatibility issues with Unity 3.2: no problemo

If you’re using A* Pathfinding project and just updated your Unity editor to the 3.2 version, you will notice 3 errors in your console that were not there before:

Assets/Editor/AstarPathEditor.cs(372,59): error CS0122: `UnityEditor.EditorStyles.notificationBackground’ is inaccessible due to its protection level

Assets/Editor/AstarPathEditor.cs(372,35): error CS1502: The best overloaded method match for `UnityEngine.GUILayout.Button(UnityEngine.GUIContent, params UnityEngine.GUILayoutOption[])’ has some invalid arguments

Assets/Editor/AstarPathEditor.cs(372,35): error CS1503: Argument `#2′ cannot convert `object’ expression to type `UnityEngine.GUILayoutOption[]’

Well, don’t panic, here is a quick fix that will save your day you some minutes^^:

In the Assets/Editor/AstarPathEditor.cs file, line 372, replace

GUILayout.Button (co,EditorStyles.notificationBackground);

by

GUILayout.Button (co);

Save the file and go back to Unity editor: simple, right? you’re welcome XD

New version of the iTween+AStar test project

Here is a sexier version of the test project mixing iTween and AStar tools (see first post about it).

iTween configuration has been tweaked to fit a more realistic trajectory (player’s orientation is better than previous version but still not totally satisfying).

Below the interesting part of the main script (Player.cs):

iTween.MoveTo(gameObject, iTween.Hash

(

“path”, path,

“orienttopath”, true,

“looktime”, 1.0,

“lookahead”, 0.05,

“axis”, “y”,

“easetype”, iTween.EaseType.linear,

“time”, iTween.PathLength(path) / moveSpeed,

“oncomplete”, “OnMoveComplete”

));

See iTween.MoveTo method’s documentation for more details about parameters.

It also uses the soldier model from the Unity3D “Bootcamp” demo and its animations, that’s why the web player build and project archive are a bit heavier than before ^^;

Try the Web Player version (4.4 Mo) and/or download the project sources (24.6 Mo).

Using UltraEdit for UniScript/Unity3D JavaScript programming

As everybody starting programming for Unity3D, I’ve quickly riched the limits of the built-in IDE/code editor (UniScite).

I’ve tested every known solutions I found on Unity3D forums and related websites  for editing Unity3D scripts and I must admit I haven’t found any satisfaying one yet : (

As my first love (therefore my strongest love) in IDE world is UltraEdit, I decided to work on another solution to use it for my Unity3D programming.

The major features I want when programming for Unity3D are:

ease of use (this one is mainly a matter of personnal preference)

syntax highlighting (based on UltraEdit wordfile system)

code auto-completion (based on UltraEdit wordfile system)

– Unity3D console double click redirecting to the buggy line (this one is still missing in my solution 🙁 any help on that would be great!)

UltraEdit wordfile is basically a pretty simple and opened system allowing user to define a set of keywords associated to a programming language (more details here).

So I simply added to the default JavaScript wordfile the Unity3D specific keywords I extracted from the unitykeywords.properties UniScite file (you can find it in your UniScite installation directory, by default: C:Program FilesUnityEditorDataToolsUniSciTEunitykeywords.properties).

After a bit of formatting/regexping, here is the resulting file.

See this page to know how to add/use it with UltraEdit.

And don’t hesitate to post your questions/comments below! 😉

Great BurgZergArcade’s Hack&Slash RPG tutorial

Thanks to twitter, I found a very interesting and complete video tutorial covering development of a hack&slash game using Unity3D.

The video series can be found on BurgZergArcade’s blog or from BurgZergArcade’s youtube channel (you can also subscribe to it 🙂 ).

And if you want to support the author of this tutorial or simply want the code of the project, you can buy it here (really worth the 10$).

Here is the first video of the series:

Other Unity3D tutorial videos can be found in their Unity3D tutorial section.

Enjoy!

Final part of 41 post’s “JavaScript vs. C#” series

Following my previous post about it, here is the last part dealing with ray casting in Unity3d and giving an interesting conclusion about why to choose one language or the other.

This is pretty much what you will find on forums and other sources about C# VS JavaScript.

Here are some pieces of it:

[…] people that are beginning to grasp the basic concepts of programming, or just started programming games recently or are new to Unity3D, should stick with JavaScript, because they will have less to worry about[…]

[…] For the folks who have some programming baggage with C#, C++ or Java and some experience with game programming in these languages: go directly to C#.
[…]

Unity3D Asset Store web access

If (like me) you’re working behind a proxy and thus cannot access the asset store from Unity3D’s editor (no way to configure any proxy), here is a way to partially deal with it: simply access the asset store from your browser (which must have the proxy configuration set of course) !

Try this: https://kharma.unity3d.com (you will need your unity3d.com credentials)

“Partially” because you will only be able to browse the packages but not to download it 🙁

HTTPS access has been removed and I’ve no other solution 🙁

And by the way, as mentioned in the last unity3D blog post, a bunch of new assets have been added to the Art packages category, check it out!

Interesting Unity3D programming blog spotted : “41 Post”

Found some really interesting articles on the “41 post” blog, wanted to share it.

First one explaining how to access a C# script from a Javascript class and the other way around:

Unity3D: JavaScript->C# or C#->JavaScript access

Next one is a series of articles exposing the major differences between Javascript and C# programming in Unity3D:

Unity3D: JavaScript vs. C# – Part 1
Unity3D: JavaScript vs. C# – Part 2
Unity3D: JavaScript vs. C# – Part 3
Unity3D: JavaScript vs. C# – Part 4
Unity3D: JavaScript vs. C# – Part 5

Many thanks to DimasTheDriver!

Update: added Part 5

iTween + A* Pathfinding = <3

When pixelplacement’s iTween meets Aron Granberg’s A* Pathfinding, you get a quick demo of what you can achieve with powerful and easy to use tools.

With just 2 little scripts (basically 2 function calls, one for each tool), I easily managed to set a typical path finding system.

Try the Web Player version (86 Ko).

And here is the project sources (1.5 Mo).

Check comments in the Player.cs and KeyPoint.cs scripts for more details about this implementation.

Big up to Bob “pixelplacement” Berkebile and Aron Granberg for their work! o//

Edit : opened a thread on Unity3D “showcase” forum:

http://forum.unity3d.com/threads/70996-iTween-A*-Pathfinding-lt-3

1 2 3 4 Scroll to top