1
2014
Get Custom Properties from 3dsMax FBX model
Maybe not from the fbx file itself (?), but each object can have custom properties, and Unity can read them on import.
Exporting FBX from 3ds Max with Custom Properties
– Right click on the object
– Select Object Properties
– Type custom properties to “User Defined” tab (it seems to be single string text area, not line by line)
– For example to make it useful, add some delimiter to your data: myvalue|anothervalue|somethingelse|…, then split the string in Unity.
– Export FBX normally for Unity
(no image)
—
Using OnPostprocessGameObjectWithUserProperties() to read those custom properties
– Create new C# script : FBXCustomProperties.cs
– Now select your fbx file from unity project window, right click on it, ReImport
– In the console window you should see your custom properties printed out
using UnityEditor; using UnityEngine; using System.Collections; public class FBXCustomProperties : AssetPostprocessor { void OnPostprocessGameObjectWithUserProperties (GameObject go, string[] names, System.Object[] values) { for (int i = 0; i < names.Length; i++) { string propertyName = names[i]; object propertyValue = values[i]; Debug.Log("Propname: " + propertyName + " value: " +propertyValue); } } }
References:
– Original idea is from this Unity forum topic+video about Maya FBX custom attributes
Related Posts
1 Comment + Add Comment
Leave a comment
Recent posts
- Convert LAS/LAZ/PLY pointclouds to GLTF (GLB) Point Meshes (standalone converter)
- Detect SRP (URP or HDRP) with Assembly Definition Version Defines
- [LudumDare57] Theme: Depths
- MotionVector Effect: Object “disappears” when paused
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
Recent Comments
- Using RenderDoc with Unity (graphics debugger) on
- UI Scroll View automatic Content height on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
compress mesh on import:
http://forum.unity3d.com/threads/mesh-compression-what-does-it-actually-do.33073/#post-1692866