You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Disable some editor settings by default in the XR Editor
This commit is contained in:
@@ -511,4 +511,12 @@ abstract class BaseGodotEditor : GodotActivity() {
|
||||
val godot = godot ?: return Error.ERR_UNCONFIGURED
|
||||
return verifyApk(godot.fileAccessHandler, apkPath)
|
||||
}
|
||||
|
||||
override fun supportsFeature(featureTag: String): Boolean {
|
||||
if (featureTag == "xr_editor") {
|
||||
return isNativeXRDevice();
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -992,6 +992,10 @@ class Godot(private val context: Context) {
|
||||
*/
|
||||
@Keep
|
||||
private fun hasFeature(feature: String): Boolean {
|
||||
if (primaryHost?.supportsFeature(feature) ?: false) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (plugin in pluginRegistry.allPlugins) {
|
||||
if (plugin.supportsFeature(feature)) {
|
||||
return true
|
||||
|
||||
@@ -501,4 +501,12 @@ public class GodotFragment extends Fragment implements IDownloaderClient, GodotH
|
||||
}
|
||||
return Error.ERR_UNAVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean supportsFeature(String featureTag) {
|
||||
if (parentHost != null) {
|
||||
return parentHost.supportsFeature(featureTag);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,4 +136,13 @@ public interface GodotHost {
|
||||
default Error verifyApk(@NonNull String apkPath) {
|
||||
return Error.ERR_UNAVAILABLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the given feature tag is supported.
|
||||
*
|
||||
* @see <a href="https://docs.godotengine.org/en/stable/tutorials/export/feature_tags.html">Feature tags</a>
|
||||
*/
|
||||
default boolean supportsFeature(String featureTag) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user