Month: April 2016

Version 1.6.1 is now available on the Pixel Crushers customer download site and should be available on the Unity Asset Store in a few days!

 

Version 1.6.1

Core

  • Added: DialogueSystemEvents component.
  • Added: OnPrepareConversationLine(DialogueEntry) message.
  • Improved: AudioWait() sequencer command now resets audio source’s previously-assigned clip when done.
  • Improved: Audio() sequencer command now specifies clip name when it can’t find the named clip.
  • Fixed: LuaInterpreter can now parse negative exponents in numbers (e.g., 1E-5).
  • Fixed: BarkOnIdle now resumes when disabled & re-enabled.
  • Editor:
    • Added lock checkbox to dialogue editor zoom.
    • Inverted direction mouse wheel zooms.
    • Exposed DialogueEditorWindow.OpenDialogueEntry(DialogueDatabase database, int conversationID, int dialogueEntryID)
    • Fixed: In rare cases changes to dialogue database didn’t get saved.
    • Fixed: Editing Sequence fields in editor and Sequence Trigger inspector didn’t save in some cases.
    • Fixed: Dialogue System Trigger didn’t allow you to set a different reference database.
  • CSV Import/Export:
    • Fixed: CSV import of localized text tables hung on certain multiline strings.
    • Fixed: CSV Converter now handles multiline rows with unterminated quotes.
  • Unity UI:
    • Added Wait One Frame & Interrupt Audio Clip checkboxes to typewriter effect.
    • UnityUITimer: Can now subclass to override countdown behavior.
    • Fixed: Include Invalid Entries with Buttons list Unity UI
    • Fixed CanvasGroupAnimator.Hidden clip: could cause 1-frame flash if deactivating while shown then reactivating.
  • Legacy Unity GUI: Fixed navigation when “Show Unused Buttons” was ticked.

Third Party Support

  • Adventure Creator: Added AdventureCreatorBridge option to use AC‘s subtitle toggle.
  • articy:draft:
    • Added option to convert enums (dropdowns) and slots as string names.
    • Exposed ArticyConverter.ConvertExpression(string) method.
    • Fixed error message when destination directory didn’t exist.
  • RPG Kit: Updated OpenShop method/Lua function for RPG Kit 3.1.1+.
  • Third Person Controller: Bridge script now calls rbcc.StopMovement() to stop player when starting conversation.
  • UFPS: Added PauseUFPS script and instructions on using Dialogue System Menu Template with UFPS.
  • UniStorm: Added support to include UniStorm time and weather in saved games.

 

Month: April 2016

If you’re using Opsive’s UFPS (Ultimate FPS) in Unity with a VR headset such as an Oculus Rift, you can add this script to the UFPS player to automatically rotate the player in the direction that the headset it looking.

 

VRLookToMoveUFPS.cs:

using UnityEngine;
using System.Collections;

/// <summary>
/// If using a VR device, rotate the UFPS player in the direction that the camera 
/// is looking when the player moves.
/// </summary>
public class VRLookToMoveUFPS : MonoBehaviour
{

	public float movementThreshold = 0.1f;
	
	private vp_FPCamera m_fpCamera;
	private vp_FPPlayerEventHandler m_fpPlayer;

	private IEnumerator Start()
	{
		yield return null; // Give UFPS one frame to set up.
		m_fpPlayer = FindObjectOfType<vp_FPPlayerEventHandler>();
		m_fpCamera = m_fpPlayer.GetComponentInChildren<vp_FPCamera>();
		enabled = UnityEngine.VR.VRSettings.enabled && (UnityEngine.VR.VRSettings.loadedDevice != UnityEngine.VR.VRDeviceType.None) && 
			(m_fpPlayer != null) && (m_fpCamera != null);
	}

	private void Update()
	{
		if (m_fpPlayer.Velocity.Get().magnitude > movementThreshold)
		{
			m_fpPlayer.Rotation.Set(new Vector2(m_fpPlayer.transform.rotation.eulerAngles.x, m_fpCamera.transform.rotation.eulerAngles.y));
			UnityEngine.VR.InputTracking.Recenter();
		}
	}
	
}