private void LogError(ArCameraMetadataType requestedType)
 {
     ARDebug.LogErrorFormat(
         "Error getting value from CameraMetadataType due to type mismatch. " +
         "requested type = {0}, internal type = {1}\n" +
         "Are you sure you are querying the correct type?", requestedType, _type);
 }
        /// <summary>
        /// Constructs CameraMetadataValue using long. This constructor only sets the long field
        /// in the struct, leaving the rest of the data to default value.
        /// </summary>
        /// <param name="longValue">The long value set to the struct.</param>
        public CameraMetadataValue(long longValue)
        {
            _byteValue     = 0;
            _intValue      = 0;
            _floatValue    = 0;
            _doubleValue   = 0;
            _rationalValue = new CameraMetadataRational();

            _type      = ArCameraMetadataType.Int64;
            _longValue = longValue;
        }
        /// <summary>
        /// Constructs CameraMetadataValue using sbyte. This constructor only sets the sbyte field
        /// in the struct, leaving the rest of the data to default value.
        /// </summary>
        /// <param name="byteValue">The byte value set to the struct.</param>
        public CameraMetadataValue(sbyte byteValue)
        {
            _intValue      = 0;
            _longValue     = 0;
            _floatValue    = 0;
            _doubleValue   = 0;
            _rationalValue = new CameraMetadataRational();

            _type      = ArCameraMetadataType.Byte;
            _byteValue = byteValue;
        }
        /// <summary>
        /// Constructs CameraMetadataValue using CameraMetadataRational. This constructor only sets
        /// the CameraMetadataRational field in the struct, leaving the rest of the data to default
        /// value.
        /// </summary>
        /// <param name="rationalValue">The CameraMetadataRational value set to the struct.</param>
        public CameraMetadataValue(CameraMetadataRational rationalValue)
        {
            _byteValue   = 0;
            _intValue    = 0;
            _longValue   = 0;
            _floatValue  = 0;
            _doubleValue = 0;

            _type          = ArCameraMetadataType.Rational;
            _rationalValue = rationalValue;
        }