/// <summary>
 /// Overrides the existing data settings with given ones.
 /// </summary>
 /// <param name="newSettingsData">Settings data to override with.</param>
 public void OverrideData(MobileInputSettingsData newSettingsData)
 {
     minHorizontalSwipeLength = newSettingsData.minHorizontalSwipeLength;
     minVerticalSwipeLength   = newSettingsData.minVerticalSwipeLength;
     minTapDuration           = newSettingsData.minTapDuration;
     maxTapDuration           = newSettingsData.maxTapDuration;
 }
예제 #2
0
        /// <summary>
        /// Creates a mobile input settings asset with default values.
        /// </summary>
        /// <returns>Instance of the settings scripatble object.</returns>
        public static MobileInputSettingsData CreateDefaultSettingsAsset()
        {
            MobileInputSettingsData defaultSettings = ScriptableObject.CreateInstance <MobileInputSettingsData>();

            AssetDatabase.CreateAsset(defaultSettings, "Assets/Resources/" + defaultSettingsAssetName + ".asset");
            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();
            EditorUtility.FocusProjectWindow();

            return(defaultSettings);
        }