Table of Contents | ||
---|---|---|
|
...
Upgrading .unitypackage files is a little more difficult. This quote from the Unity docs explains it:
"For the cleanest possible upgrade, it should be considered to remove the old package contents first, as some scripts, effects or prefabs might have become deprecated or unneeded and Unity packages don't have a way of deleting (unneeded) files (but make sure to have a security copy of the old version available)."
The easiest way I've found is to use the approach the SVN docs recommend for vendor branch upgrades.
...
Through the Unity Editor, many variables of vhAssets script components can be customized
DebugConsole
Captures all SmartBody and Unity log ouput and display it to user. Also can be used to send commands. Type '?' for a list of available commands.
Variable Name | Purpose | Value Range |
---|---|---|
Percentage Of Screen | The amount of vertical space that the debug console GUI will span | float 0 - 1 |
FreeMouseLook
Variable Name | Purpose | Value Range |
---|---|---|
Axes | Specifies which axes the camera can rotate around | MouseX, MouseY, MouseXAndY |
Sensitivity X/Y | Angular velocity for camera rotation | float |
Movement Speed | Linear velocity for camera movement | float |
Secondary Movement | Linear velocity for camera movement when holding the left shift key | float |
Maximum X//Y | Max angle the camera can rotate on an axis before being clamped | -360 to +360 |
Minimum X/Y | Min angle the camera can rotate on an axis before being clamped | -360 to +360 |
Camera Rotation On | Enables/Disables camera rotation from mouse movement: True or False | True/False |
Move Keys | Allows specification for which keys are used to make the camera move up, down, left, right, forward, backward, and toggle rotation on/off | KeyCode |
Loading Screen
Provides functionality for full screen image
VHBehaviour
Allows for control of the call ordering of all MonoBehaviour messages sent from Unity.
Variable Name | Purpose | Value Range |
---|---|---|
Initial Priority | The ordering in which this script will be called compared to other VHBehaviours. A lower number entails a higher priority. i.e. priority 0 behaviours get processed before priority 10 behaviours | int |
VHBehaviourManager
The control system that allows for correct processing order of VHBehaviours. This object MUST be present in order for VHBehaviours to work
VHWayPointNavigator
Variable Name | Purpose | Value Range |
---|---|---|
Speed | Linear movement rate at which you move between waypoints | float |
Turn Towards Target | Turn to face your next waypoint target. | True/False |
Ignore Height | Only move to next waypoint along the x/z axes | True/False |
Immediately Start Pathing | Start Pathing: As soon as the scene starts, start moving | True/False |
Loop Type | Action to take upon reaching the last way point of the path | Loop, Ping Pong, Stop |
Pather | The gameobject that will do the moving | GameObject |
WayPoints | The list of transforms that will be used as waypoints for the pather to move along | GameObject |
VHTimeDemo
Works with VHWayPointNavigator and FpsCounter to track performance along a specified path in the scene and then uploads fps/performance data to a database
Variable Name | Purpose | Value Range |
---|---|---|
Time Demo Name | Identifying name of this time demo. Used for starting a specific time demo through the console or command line | string |
Performance Log Name | The filename for the output log from unity's performance tracking | string |
Project Name | Specifies the project this demo is used for | string |
Time Demo Length | The amount of time it will take for the time demo to complete once started | positive float |
Fps Sampling Rate | How often the fps will be sampled during the time demo | positive float |
SmartBodyManager
Interfaces with SmartBody.dll to provide SmartBody character animation to unity
Variable Name | Purpose | Value Range |
---|---|---|
Path To SBM Files | The directory in which SmartBody should look for initialization files. Starting directory is the current unity project folder | string |
Character Load Path | Project subdirectory in which character prefabs should be instantiated from | string |
Position Scale | Units of measurement between SmartBody and unity can sometimes be different based on how the art was exported. If there is a difference, it can be mitigated with this variable | positive float |
Display Log Messages | Toggle for allowing SmartBody LOGs to be output to unity. | True/False |
All Facebone Characters | Toggle for making all unity SmartBody driven characters facebone drive or not | True/False |
Cam Settings | Used for the SBMonitor to duplicate the renderer viewport and camera | positive float |
Initial VHMsgs to Send | VHMsgs that will get sent as soon as SmartBody is initialized | string |
UnitySmartBodyCharacter
Works with SmartBodyManager to have a SmartBody driven character inside of unity
Variable Name | Purpose | Value Range |
---|---|---|
Bone Parent Name | Child gameobject name path that will lead to the skeleton root | string |
Is Face Bone Driven: | Toggle that informs SmartBody whether or not this character is face bone driven | True/False |
VHMsgManager
Interfaces with VHMsg that allows communication via strings between processes
...
Send arguments with a command while typing in the console
Info |
---|
vhmsg someMessage |
VHMsgManager
Subscribe to a certain type of message
...
Info |
---|
vhmsg.AddMessageEventHandler(new VHMsgBase.MessageEventHandler(VHMsg_MessageEvent)); void VHMsg_MessageEvent(object sender, VHMsgBase.Message message) { string [] splitargs = message.s.Split( " ".ToCharArray() ); if (splitargs[0] == "someMessage") // Do Something } |
Build Process
You can customize the build process by creating and modifying a BuildSettings.xml file.
- Inside the assets folder in your unity project, create a file called BuildSettings.xml
In the same folder as the Assets folder within your Unity project create a .bat file with the following lines
Info @setlocal
set PROJECTPATH=%CD%
pushd ..\Unity
call runEditorBatch.bat -projectPath %PROJECTPATH% -batchmode -nographics -quit -executeMethod UnityStartup.PerformWindowsBuild
popd
@endlocal
Use the following template for custom modification
Info <?xml version="1.0" encoding="utf-8"?>
<BuildSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.cpandl.com">
<ExternalAssetsPaths>
<string>Assets/SomeDirectory</string>
<string>Assets/SomeOtherDirectory</string>
</ExternalAssetsPaths>
<BuildOutputPath>Builds/YourProject/YourProject.exe</BuildOutputPath>
<PostBuildScript>somePostBuildScript.bat</PostBuildScript>
<ConfigFiles>
<string>Assets/config.ini</string>
</ConfigFiles>
</BuildSettings>
BuildSettings.xml Format
Field | Desrcription |
---|---|
ExternalAssetsPaths | Array of folder names that will be copied to the BuildOutputPath. (OPTIONAL) |
BuildOutputPath | Path specifying the name and location of the .exe for your build (REQUIRED) |
PostBuildScript | A .bat or .exe that will be run after the build process is completed. (OPTIONAL) |
ConfigFiles | Array of file names taht will be copied to the BuildOutputPath. (OPTIONAL) |
Config File Parsing
You can create a config .ini file in your project and read it using the IniParser class
...