Ejemplo n.º 1
0
        private void MonitorPlayerSettings()
        {
            string _currentBuildIdentifier = EditorPrefs.GetString(kBuildIdentifierKey, null);

            if (string.Equals(_currentBuildIdentifier, PlayerSettings.GetBundleIdentifier()))
            {
                return;
            }

            // Update value
            EditorPrefs.SetString(kBuildIdentifierKey, PlayerSettings.GetBundleIdentifier());

            // Update Android manifest
            OnApplicationConfigurationChanged();
        }
Ejemplo n.º 2
0
        private void MonitorPlayerSettings()
        {
            string _oldBuildIdentifier = EditorPrefs.GetString(kPrefsKeyBuildIdentifier, null);
            string _curBuildIdentifier = VBPlayerSettings.GetBundleIdentifier();

            if (string.Equals(_oldBuildIdentifier, _curBuildIdentifier))
            {
                return;
            }

            // Update value
            EditorPrefs.SetString(kPrefsKeyBuildIdentifier, _curBuildIdentifier);

            // Save changes
            SaveConfigurationChanges();
        }
Ejemplo n.º 3
0
        private static void MonitorPlayerSettings()
        {
            // check whether there's change in value
            string _oldBuildIdentifier = EditorPrefs.GetString(kPrefsKeyBuildIdentifier, null);
            string _curBuildIdentifier = PlayerSettings.GetBundleIdentifier();

            if (string.Equals(_oldBuildIdentifier, _curBuildIdentifier))
            {
                return;
            }

            // save copy of new value
            EditorPrefs.SetString(kPrefsKeyBuildIdentifier, _curBuildIdentifier);

            // rebuild associated files
            NPSettings _settings = NPSettings.Instance;

            if (_settings != null)
            {
                _settings.Rebuild();
            }
        }
        private void WriteProviderInfo(XmlWriter _xmlWriter)
        {
            // Provider
            _xmlWriter.WriteComment("Custom File Provider. Sharing from internal folders  \"com.voxelbusters.nativeplugins.extensions.FileProviderExtended\"");
            _xmlWriter.WriteStartElement("provider");
            {
                WriteAttributeString(_xmlWriter, "android", "name", null, "com.voxelbusters.nativeplugins.extensions.FileProviderExtended");
                WriteAttributeString(_xmlWriter, "android", "authorities", null, string.Format("{0}.fileprovider", PlayerSettings.GetBundleIdentifier()));
                WriteAttributeString(_xmlWriter, "android", "exported", null, "false");
                WriteAttributeString(_xmlWriter, "android", "grantUriPermissions", null, "true");

                _xmlWriter.WriteStartElement("meta-data");
                {
                    WriteAttributeString(_xmlWriter, "android", "name", null, "android.support.FILE_PROVIDER_PATHS");
                    WriteAttributeString(_xmlWriter, "android", "resource", null, "@xml/nativeplugins_file_paths");
                }
                _xmlWriter.WriteEndElement();
            }
            _xmlWriter.WriteEndElement();
        }