// Copyright (c) Meta Platforms, Inc. and affiliates.
using UnityEngine;
namespace Lofelt.NiceVibrations
{
///
/// Represents an imported haptic clip asset.
///
///
/// HapticClip contains the data of a haptic clip asset imported from a .haptic file,
/// in a format suitable for playing it back at runtime.
/// A HapticClip is created by HapticImporter when importing a haptic clip asset
/// in the Unity editor, and can be played back at runtime with e.g. HapticSource or
/// HapticController::Play().
///
/// It contains two representations:
/// - JSON, used for playback on iOS and Android
/// - GamepadRumble, used for playback on gamepads with the GamepadRumbler class
public class HapticClip : ScriptableObject
{
///
/// The JSON representation of the haptic clip, stored as a byte array encoded in UTF-8,
/// without a null terminator
///
[SerializeField]
public byte[] json;
///
/// The haptic clip represented as a GamepadRumble struct
///
[SerializeField]
public GamepadRumble gamepadRumble;
}
}