[Bf-gamedev] New FBX Exporter

Simon Broggi simon.broggi at gmail.com
Mon Jun 9 14:05:29 CEST 2014


Yes, custom properties work for me.
They need to be assigned to the Object in Blender, and they can be read in
Unity in an AssetPostprocessor script. This script needs to be in the
Assets/Editor/ folder in the Unity project, otherwise it wont work. Here's
the C# code. If you put it in Assets/Editor/CustomProp.cs it should work.
Unity documentation about this stuff is here:
http://docs.unity3d.com/450/Documentation/ScriptReference/AssetPostprocessor.html

using UnityEngine;
using UnityEditor;
using System.Collections;

public class CustomProp : AssetPostprocessor {
    void OnPostprocessGameObjectWithUserProperties (GameObject go, string[]
propNames, System.Object[] values){
        for (int i = 0; i < propNames.Length; i++) {
            string propName = propNames[i];
            System.Object value  = values[i];
            Debug.Log(go.name + " has Property: " + propName + "
 with value: " +value);
        }
    }
}



Insert Coin
Aargauerstrasse 60 - 12
8048 Zürich
+41 77 401 9115
www.insert-coin.ch


On Sun, Jun 8, 2014 at 10:40 PM, Mitchell Stokes <mogurijin at gmail.com>
wrote:

> Have you tested out the custom properties in Unity? I was having issues
> getting them to work but I wasn't sure if it was a problem with the export,
> or if I was messing something up with Unity.
>
>
> On Sun, Jun 8, 2014 at 3:46 AM, Simon Broggi <simon.broggi at gmail.com>
> wrote:
>
>> Great work, Thanks!
>>
>> I've tried it with Unity.
>> What I like the most is the new export of Custom Properties.
>> They can be read in the Unity AssetPostprocessor via
>> OnPostprocessGameObjectWithUserProperties.
>>
>> http://docs.unity3d.com/450/Documentation/ScriptReference/AssetPostprocessor.OnPostprocessGameObjectWithUserProperties.html
>>
>> On Fri, Jun 6, 2014 at 3:18 AM, Mitchell Stokes <mogurijin at gmail.com>
>> wrote:
>>
>>> We have a new binary FBX exporter in Blender thanks to the efforts of
>>> Bastien Montagne. You can find more information in this recent
>>> code.blender.org post:
>>> http://code.blender.org/index.php/2014/06/supporting-game-developers-with-blender-2-71/
>>>
>>> We've run various tests ourselves, but we'd really like to get feedback
>>> from people actually using Blender to create assets for use in engines such
>>> as Unity, UDK, UE4, or just about any engine that accepts FBX files. To
>>> this end, we highly encourage users to test out recent development builds
>>> (found at http://builder.blender.org/) and play around with the new
>>> exporter. Use it, abuse it, throw your complicated production files at it,
>>> and then let us know what breaks via the bug tracker (
>>> https://developer.blender.org/).
>>>
>>> --Mitchell Stokes
>>>
>>> _______________________________________________
>>> Bf-gamedev mailing list
>>> Bf-gamedev at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-gamedev
>>>
>>>
>>
>> _______________________________________________
>> Bf-gamedev mailing list
>> Bf-gamedev at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-gamedev
>>
>>
>
> _______________________________________________
> Bf-gamedev mailing list
> Bf-gamedev at blender.org
> http://lists.blender.org/mailman/listinfo/bf-gamedev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-gamedev/attachments/20140609/f734f240/attachment.htm 


More information about the Bf-gamedev mailing list