@preeternal/react-native-godot 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/Package.swift +106 -0
- package/README.md +631 -2
- package/android/build.gradle +289 -0
- package/android/consumer-rules.pro +19 -0
- package/android/fix-prefab.gradle +54 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/CMakeLists.txt +74 -0
- package/android/src/main/cpp/GodotModule.cpp +718 -0
- package/android/src/main/cpp/OnLoad.cpp +66 -0
- package/android/src/main/cpp/libgodot_android.h +79 -0
- package/android/src/main/cpp/libgodot_jni.cpp +585 -0
- package/android/src/main/cpp/libgodot_jni.h +130 -0
- package/android/src/main/cpp/native_godot_module_jni.cpp +86 -0
- package/android/src/main/cpp/native_godot_module_jni.h +58 -0
- package/android/src/main/java/com/preeternal/reactnativegodot/NativeGodotModuleModule.kt +83 -0
- package/android/src/main/java/com/preeternal/reactnativegodot/NativeGodotModulePackage.kt +41 -0
- package/android/src/main/java/com/preeternal/reactnativegodot/NativeLibraryLoader.kt +5 -0
- package/android/src/main/java/com/preeternal/reactnativegodot/RTNGodotView.kt +81 -0
- package/android/src/main/java/com/preeternal/reactnativegodot/RTNGodotViewManager.kt +34 -0
- package/android/src/main/java/com/preeternal/reactnativegodot/RTNLibGodot.kt +350 -0
- package/android/src/main/res/layout/downloading_expansion.xml +165 -0
- package/android/src/main/res/layout/godot_app_layout.xml +5 -0
- package/android/src/main/res/layout/snackbar.xml +27 -0
- package/android/src/main/res/layout/status_bar_ongoing_event_progress_bar.xml +108 -0
- package/android/src/main/res/mipmap/icon.png +0 -0
- package/android/src/main/res/mipmap/icon_background.png +0 -0
- package/android/src/main/res/mipmap/icon_foreground.png +0 -0
- package/android/src/main/res/mipmap/icon_monochrome.png +0 -0
- package/android/src/main/res/mipmap-anydpi-v26/icon.xml +8 -0
- package/android/src/main/res/mipmap-anydpi-v26/themed_icon.xml +11 -0
- package/android/src/main/res/mipmap-hdpi/icon.png +0 -0
- package/android/src/main/res/mipmap-hdpi/icon_background.png +0 -0
- package/android/src/main/res/mipmap-hdpi/icon_foreground.png +0 -0
- package/android/src/main/res/mipmap-hdpi/icon_monochrome.png +0 -0
- package/android/src/main/res/mipmap-mdpi/icon.png +0 -0
- package/android/src/main/res/mipmap-mdpi/icon_background.png +0 -0
- package/android/src/main/res/mipmap-mdpi/icon_foreground.png +0 -0
- package/android/src/main/res/mipmap-mdpi/icon_monochrome.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/icon.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/icon_background.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/icon_foreground.png +0 -0
- package/android/src/main/res/mipmap-xhdpi/icon_monochrome.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/icon.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/icon_background.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/icon_foreground.png +0 -0
- package/android/src/main/res/mipmap-xxhdpi/icon_monochrome.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/icon.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/icon_background.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/icon_foreground.png +0 -0
- package/android/src/main/res/mipmap-xxxhdpi/icon_monochrome.png +0 -0
- package/android/src/main/res/values/dimens.xml +9 -0
- package/android/src/main/res/values/strings.xml +61 -0
- package/android/src/main/res/values/styles.xml +25 -0
- package/android/src/main/res/values-fa/strings.xml +14 -0
- package/android/src/main/res/values-ko/strings.xml +54 -0
- package/android/src/main/res/xml/godot_provider_paths.xml +15 -0
- package/android/src/test/java/com/preeternal/reactnativegodot/NativeGodotModulePackageTest.kt +26 -0
- package/app.plugin.js +173 -0
- package/cpp/GodotModule.h +103 -0
- package/cpp/NativeGodotModule.cpp +825 -0
- package/cpp/NativeGodotModule.h +45 -0
- package/cpp/godot-log.h +64 -0
- package/ios/GodotModule.mm +661 -0
- package/ios/NativeGodotModuleProvider.h +35 -0
- package/ios/NativeGodotModuleProvider.mm +42 -0
- package/ios/RTNGodotView.h +42 -0
- package/ios/RTNGodotView.mm +711 -0
- package/ios/log.mm +38 -0
- package/lib/module/NativeNativeGodotModule.js +59 -0
- package/lib/module/NativeNativeGodotModule.js.map +1 -0
- package/lib/module/RTNGodotView.js +6 -0
- package/lib/module/RTNGodotView.js.map +1 -0
- package/lib/module/RTNGodotView.native.js +5 -0
- package/lib/module/RTNGodotView.native.js.map +1 -0
- package/lib/module/RTNGodotViewNativeComponent.ts +37 -0
- package/lib/module/index.js +30 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NativeNativeGodotModule.d.ts +26 -0
- package/lib/typescript/src/NativeNativeGodotModule.d.ts.map +1 -0
- package/lib/typescript/src/RTNGodotView.d.ts +7 -0
- package/lib/typescript/src/RTNGodotView.d.ts.map +1 -0
- package/lib/typescript/src/RTNGodotView.native.d.ts +3 -0
- package/lib/typescript/src/RTNGodotView.native.d.ts.map +1 -0
- package/lib/typescript/src/RTNGodotViewNativeComponent.d.ts +11 -0
- package/lib/typescript/src/RTNGodotViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +262 -4
- package/prebuilt-utils.rb +36 -0
- package/react-native-godot.podspec +41 -0
- package/react-native.config.js +15 -0
- package/scripts/check-16kb.sh +136 -0
- package/scripts/check-packaged-artifacts.sh +154 -0
- package/scripts/ci/verify-prebuilt-install.cjs +39 -0
- package/scripts/download-prebuilt.js +274 -0
- package/src/NativeNativeGodotModule.ts +90 -0
- package/src/RTNGodotView.native.tsx +2 -0
- package/src/RTNGodotView.tsx +12 -0
- package/src/RTNGodotViewNativeComponent.ts +37 -0
- package/src/index.tsx +28 -0
|
@@ -0,0 +1,711 @@
|
|
|
1
|
+
/**************************************************************************/
|
|
2
|
+
/* RTNGodotView.mm */
|
|
3
|
+
/**************************************************************************/
|
|
4
|
+
/* Copyright (c) 2024-2025 Slay GmbH */
|
|
5
|
+
/* */
|
|
6
|
+
/* Permission is hereby granted, free of charge, to any person obtaining */
|
|
7
|
+
/* a copy of this software and associated documentation files (the */
|
|
8
|
+
/* "Software"), to deal in the Software without restriction, including */
|
|
9
|
+
/* without limitation the rights to use, copy, modify, merge, publish, */
|
|
10
|
+
/* distribute, sublicense, and/or sell copies of the Software, and to */
|
|
11
|
+
/* permit persons to whom the Software is furnished to do so, subject to */
|
|
12
|
+
/* the following conditions: */
|
|
13
|
+
/* */
|
|
14
|
+
/* The above copyright notice and this permission notice shall be */
|
|
15
|
+
/* included in all copies or substantial portions of the Software. */
|
|
16
|
+
/* */
|
|
17
|
+
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
|
|
18
|
+
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
|
|
19
|
+
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
|
|
20
|
+
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
|
|
21
|
+
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
|
|
22
|
+
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
|
|
23
|
+
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
|
24
|
+
/**************************************************************************/
|
|
25
|
+
|
|
26
|
+
#import <React/RCTLog.h>
|
|
27
|
+
#import <React/RCTUIManager.h>
|
|
28
|
+
|
|
29
|
+
#include <cmath>
|
|
30
|
+
|
|
31
|
+
#include <libgodot/libgodot.h>
|
|
32
|
+
#include <godot_cpp/classes/display_server_embedded.hpp>
|
|
33
|
+
#include <godot_cpp/classes/engine.hpp>
|
|
34
|
+
#include <godot_cpp/classes/godot_instance.hpp>
|
|
35
|
+
#include <godot_cpp/classes/main_loop.hpp>
|
|
36
|
+
#include <godot_cpp/classes/rendering_native_surface.hpp>
|
|
37
|
+
#include <godot_cpp/classes/rendering_native_surface_apple.hpp>
|
|
38
|
+
#include <godot_cpp/classes/scene_tree.hpp>
|
|
39
|
+
#include <godot_cpp/classes/window.hpp>
|
|
40
|
+
#include <godot_cpp/core/math.hpp>
|
|
41
|
+
#include <godot_cpp/godot.hpp>
|
|
42
|
+
#include <godot_cpp/variant/utility_functions.hpp>
|
|
43
|
+
|
|
44
|
+
#include "GodotModule.h"
|
|
45
|
+
|
|
46
|
+
#import "RTNGodotView.h"
|
|
47
|
+
|
|
48
|
+
#import <react/renderer/components/RTNGodotSpec/ComponentDescriptors.h>
|
|
49
|
+
#import <react/renderer/components/RTNGodotSpec/EventEmitters.h>
|
|
50
|
+
#import <react/renderer/components/RTNGodotSpec/Props.h>
|
|
51
|
+
#import <react/renderer/components/RTNGodotSpec/RCTComponentViewHelpers.h>
|
|
52
|
+
|
|
53
|
+
using namespace facebook::react;
|
|
54
|
+
|
|
55
|
+
static const int MAX_TOUCH_COUNT = 32;
|
|
56
|
+
|
|
57
|
+
static NSHashTable<UIView *> *_views = [NSHashTable weakObjectsHashTable];
|
|
58
|
+
static __weak UIView *_currentView = nil;
|
|
59
|
+
|
|
60
|
+
@interface RTNGodotView () <RCTRTNGodotViewViewProtocol>
|
|
61
|
+
@end
|
|
62
|
+
@implementation RTNGodotView {
|
|
63
|
+
NSString *_windowName;
|
|
64
|
+
CALayer *_renderingLayer;
|
|
65
|
+
uint64_t _windowId;
|
|
66
|
+
godot::Ref<godot::RenderingNativeSurface> _nativeSurface;
|
|
67
|
+
std::vector<UITouch *> _touches;
|
|
68
|
+
bool _propsUpdated;
|
|
69
|
+
bool _instanceCallbackRegistered;
|
|
70
|
+
bool _isMounted;
|
|
71
|
+
uint64_t _attachmentGeneration;
|
|
72
|
+
uint64_t _resizeGeneration;
|
|
73
|
+
godot::Vector2i _lastRequestedPixelSize;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
+ (BOOL)shouldBeRecycled {
|
|
77
|
+
return NO;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
+ (void)removeMainLayerFromGodotView:(UIView *)view {
|
|
81
|
+
if (![_views containsObject:view]) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
CALayer *mainLayer = (__bridge CALayer *)GodotModule::get_singleton()->get_main_rendering_layer();
|
|
86
|
+
|
|
87
|
+
if (view == _currentView) {
|
|
88
|
+
if (mainLayer) {
|
|
89
|
+
[mainLayer removeFromSuperlayer];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
[_views removeObject:view];
|
|
93
|
+
|
|
94
|
+
if (_views.count > 0) {
|
|
95
|
+
RTNGodotView *nextView = (RTNGodotView *)_views.allObjects.lastObject;
|
|
96
|
+
_currentView = nextView;
|
|
97
|
+
if (mainLayer) {
|
|
98
|
+
[CATransaction begin];
|
|
99
|
+
[CATransaction setDisableActions:YES];
|
|
100
|
+
mainLayer.hidden = YES;
|
|
101
|
+
[nextView.layer addSublayer:mainLayer];
|
|
102
|
+
[CATransaction commit];
|
|
103
|
+
nextView->_lastRequestedPixelSize = godot::Vector2i();
|
|
104
|
+
[nextView setNeedsLayout];
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
_currentView = nil;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
+ (CALayer *)addMainLayerToGodotView:(UIView *)view {
|
|
112
|
+
godot::Ref<godot::RenderingNativeSurface> nativeSurface = GodotModule::get_singleton()->get_main_rendering_surface();
|
|
113
|
+
if (nativeSurface.is_null()) {
|
|
114
|
+
return nil;
|
|
115
|
+
}
|
|
116
|
+
godot::Ref<godot::RenderingNativeSurfaceApple> appleSurface = godot::Object::cast_to<godot::RenderingNativeSurfaceApple>(*nativeSurface);
|
|
117
|
+
if (appleSurface.is_null()) {
|
|
118
|
+
return nil;
|
|
119
|
+
}
|
|
120
|
+
CALayer *mainLayer = (__bridge CALayer *)(void *)appleSurface->get_layer();
|
|
121
|
+
if (!mainLayer) {
|
|
122
|
+
return nil;
|
|
123
|
+
}
|
|
124
|
+
if (![_views containsObject:view]) {
|
|
125
|
+
[_views addObject:view];
|
|
126
|
+
}
|
|
127
|
+
if (mainLayer.superlayer != nil) {
|
|
128
|
+
[mainLayer removeFromSuperlayer];
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
[view.layer addSublayer:mainLayer];
|
|
132
|
+
[CATransaction begin];
|
|
133
|
+
[CATransaction setDisableActions:YES];
|
|
134
|
+
mainLayer.hidden = YES;
|
|
135
|
+
mainLayer.frame = view.bounds;
|
|
136
|
+
[CATransaction commit];
|
|
137
|
+
[view setNeedsLayout];
|
|
138
|
+
|
|
139
|
+
_currentView = view;
|
|
140
|
+
return mainLayer;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
- (instancetype)init {
|
|
144
|
+
if (self = [super init]) {
|
|
145
|
+
// Fabric requires the component's own default props before the first update.
|
|
146
|
+
static const auto defaultProps = std::make_shared<const RTNGodotViewProps>();
|
|
147
|
+
_props = defaultProps;
|
|
148
|
+
[self setDefaultValues];
|
|
149
|
+
}
|
|
150
|
+
return self;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
- (void)setDefaultValues {
|
|
154
|
+
while (self.subviews.firstObject) {
|
|
155
|
+
[self.subviews.firstObject removeFromSuperview];
|
|
156
|
+
}
|
|
157
|
+
self.multipleTouchEnabled = YES;
|
|
158
|
+
|
|
159
|
+
_renderingLayer = nil;
|
|
160
|
+
_windowId = 0;
|
|
161
|
+
_touches.reserve(MAX_TOUCH_COUNT);
|
|
162
|
+
for (int i = 0; i < MAX_TOUCH_COUNT; ++i) {
|
|
163
|
+
_touches.push_back(nil);
|
|
164
|
+
}
|
|
165
|
+
_propsUpdated = false;
|
|
166
|
+
_instanceCallbackRegistered = false;
|
|
167
|
+
_windowName = @"";
|
|
168
|
+
_isMounted = false;
|
|
169
|
+
_attachmentGeneration = 0;
|
|
170
|
+
_resizeGeneration = 0;
|
|
171
|
+
_lastRequestedPixelSize = godot::Vector2i();
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
//Setter method
|
|
175
|
+
- (void)setWindowName:(NSString *)n {
|
|
176
|
+
if (n == nil) {
|
|
177
|
+
n = @"";
|
|
178
|
+
}
|
|
179
|
+
if ([_windowName isEqualToString:n]) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
NSLog(@"Setting windowName to: %@", n);
|
|
184
|
+
_windowName = n;
|
|
185
|
+
if (self.superview) {
|
|
186
|
+
// Remove and add again
|
|
187
|
+
[self removeFromGodotView:true unregister:true];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
//Getter method
|
|
192
|
+
- (NSString *)windowName {
|
|
193
|
+
NSLog(@"Returning windowName: %@", _windowName);
|
|
194
|
+
return _windowName;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
- (void)setNeedsLayout {
|
|
198
|
+
[super setNeedsLayout];
|
|
199
|
+
[self invalidateIntrinsicContentSize];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
- (CGSize)intrinsicContentSize {
|
|
203
|
+
return [self sizeThatFits:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX)];
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
- (void)dealloc {
|
|
207
|
+
if (_instanceCallbackRegistered) {
|
|
208
|
+
GodotModule::get_singleton()->unregisterWindowUpdateCallback((__bridge void *)self);
|
|
209
|
+
}
|
|
210
|
+
if ([NSThread isMainThread]) {
|
|
211
|
+
[RTNGodotView removeMainLayerFromGodotView:self];
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
- (void)addToGodotView {
|
|
216
|
+
NSLog(@"RTNGodotView: Adding Godot View: %@, windowName: %@", self, _windowName);
|
|
217
|
+
if (!_isMounted) {
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
godot::GodotInstance *instance = GodotModule::get_singleton()->get_instance();
|
|
222
|
+
|
|
223
|
+
if (!_instanceCallbackRegistered) {
|
|
224
|
+
GodotModule::get_singleton()->unregisterWindowUpdateCallback((__bridge void *)self);
|
|
225
|
+
std::string newWinName = [_windowName UTF8String];
|
|
226
|
+
__weak RTNGodotView *weakSelf = self;
|
|
227
|
+
GodotModule::get_singleton()->registerWindowUpdateCallback(newWinName, (__bridge void *)self, [weakSelf](bool adding) {
|
|
228
|
+
RTNGodotView *strongSelf = weakSelf;
|
|
229
|
+
if (!strongSelf) {
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (adding) {
|
|
233
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
234
|
+
RTNGodotView *view = weakSelf;
|
|
235
|
+
if (!view) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
NSLog(@"RTNGodotView: Adding Godot View from Window Update Callback: %@", view);
|
|
239
|
+
[view addToGodotView];
|
|
240
|
+
});
|
|
241
|
+
} else {
|
|
242
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
243
|
+
RTNGodotView *view = weakSelf;
|
|
244
|
+
if (!view) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
NSLog(@"RTNGodotView: Removing Godot View from Window Update Callback: %@", view);
|
|
248
|
+
[view removeFromGodotView:false unregister:false];
|
|
249
|
+
});
|
|
250
|
+
} }, nullptr);
|
|
251
|
+
_instanceCallbackRegistered = true;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (!instance || !instance->is_started()) {
|
|
255
|
+
// Cannot continue without a Godot instance
|
|
256
|
+
NSLog(@"RTNGodotView: Godot instance not started yet.");
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (_windowId > 0 && godot::UtilityFunctions::is_instance_id_valid(_windowId)) {
|
|
261
|
+
NSLog(@"RTNGodotView: Window already configured");
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const uint64_t attachmentGeneration = ++_attachmentGeneration;
|
|
266
|
+
if ([@"" isEqualToString:_windowName]) {
|
|
267
|
+
// Set up the main window
|
|
268
|
+
|
|
269
|
+
GodotModule::get_singleton()->runOnGodotThread([=]() {
|
|
270
|
+
godot::MainLoop *mainLoop = godot::Engine::get_singleton()->get_main_loop();
|
|
271
|
+
godot::SceneTree *sceneTree = godot::Object::cast_to<godot::SceneTree>(mainLoop);
|
|
272
|
+
if (!sceneTree) {
|
|
273
|
+
NSLog(@"RTNGodotView: Unable to get SceneTree from Godot!");
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
godot::Window *newWindow = sceneTree->get_root();
|
|
277
|
+
const uint64_t windowId = newWindow->get_instance_id();
|
|
278
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
279
|
+
if (!self->_isMounted || self->_attachmentGeneration != attachmentGeneration) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
CALayer *renderingLayer = [RTNGodotView addMainLayerToGodotView:self];
|
|
283
|
+
if (!renderingLayer) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
self->_windowId = windowId;
|
|
287
|
+
self->_renderingLayer = renderingLayer;
|
|
288
|
+
self->_lastRequestedPixelSize = godot::Vector2i();
|
|
289
|
+
[self setNeedsLayout];
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
|
|
293
|
+
} else {
|
|
294
|
+
// Subwindow case
|
|
295
|
+
GodotModule::get_singleton()->runOnGodotThread([=]() {
|
|
296
|
+
godot::MainLoop *mainLoop = godot::Engine::get_singleton()->get_main_loop();
|
|
297
|
+
godot::SceneTree *sceneTree = godot::Object::cast_to<godot::SceneTree>(mainLoop);
|
|
298
|
+
if (!sceneTree) {
|
|
299
|
+
NSLog(@"RTNGodotView: Unable to get SceneTree from Godot!");
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
std::string newWinName = [_windowName UTF8String];
|
|
304
|
+
godot::Node *node = sceneTree->get_root()->find_child(godot::String::utf8(newWinName.c_str()), true, false);
|
|
305
|
+
godot::Window *newWindow = godot::Object::cast_to<godot::Window>(node);
|
|
306
|
+
|
|
307
|
+
if (!newWindow) {
|
|
308
|
+
NSLog(@"RTNGodotView: Godot Window not valid: 0x%p", newWindow);
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
const uint64_t windowId = newWindow->get_instance_id();
|
|
312
|
+
|
|
313
|
+
CGRect screen = [[UIScreen mainScreen] bounds];
|
|
314
|
+
CALayer *newRenderingLayer = nil;
|
|
315
|
+
|
|
316
|
+
godot::Ref<godot::RenderingNativeSurfaceApple> appleSurface = godot::RenderingNativeSurfaceApple::create(0);
|
|
317
|
+
newRenderingLayer = (__bridge CALayer *)(void *)appleSurface->get_layer();
|
|
318
|
+
newRenderingLayer.bounds = CGRectMake(0, 0, screen.size.width, screen.size.height);
|
|
319
|
+
newRenderingLayer.position = CGPointMake(0, 0);
|
|
320
|
+
newRenderingLayer.anchorPoint = CGPointMake(0, 0);
|
|
321
|
+
newRenderingLayer.contentsScale = GodotModule::get_singleton()->get_content_scale_factor();
|
|
322
|
+
|
|
323
|
+
godot::RenderingNativeSurface *ptr = godot::Object::cast_to<godot::RenderingNativeSurface>(appleSurface.ptr());
|
|
324
|
+
godot::Ref<godot::RenderingNativeSurface> nativeSurface(ptr);
|
|
325
|
+
|
|
326
|
+
newWindow->set_visible(true);
|
|
327
|
+
newWindow->set_native_surface(nativeSurface);
|
|
328
|
+
godot::Callable exited_cb = GodotModule::get_singleton()->create_callable([=](const godot::Variant **p_arguments, int p_argcount, godot::Variant &r_return_value, GDExtensionCallError &r_call_error) {
|
|
329
|
+
// Window is now removed, needs relayout
|
|
330
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
331
|
+
if (self->_renderingLayer == newRenderingLayer) {
|
|
332
|
+
[newRenderingLayer removeFromSuperlayer];
|
|
333
|
+
self->_renderingLayer = nil;
|
|
334
|
+
}
|
|
335
|
+
self->_windowId = 0;
|
|
336
|
+
[self setNeedsLayout];
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
newWindow->connect("tree_exited", exited_cb);
|
|
340
|
+
|
|
341
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
342
|
+
if (!self->_isMounted || self->_attachmentGeneration != attachmentGeneration) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
self->_windowId = windowId;
|
|
346
|
+
self->_renderingLayer = newRenderingLayer;
|
|
347
|
+
self->_lastRequestedPixelSize = godot::Vector2i();
|
|
348
|
+
[CATransaction begin];
|
|
349
|
+
[CATransaction setDisableActions:YES];
|
|
350
|
+
self->_renderingLayer.hidden = YES;
|
|
351
|
+
[self.layer addSublayer:self->_renderingLayer];
|
|
352
|
+
[CATransaction commit];
|
|
353
|
+
[self setNeedsLayout];
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
- (void)removeFromGodotView:(bool)addAfter unregister:(bool)unregister {
|
|
360
|
+
NSLog(@"RTNGodotView: Removing Godot View: %@, windowName: %@, addAfter: %d", self, _windowName, addAfter);
|
|
361
|
+
++_attachmentGeneration;
|
|
362
|
+
if (unregister) {
|
|
363
|
+
GodotModule::get_singleton()->unregisterWindowUpdateCallback((__bridge void *)self);
|
|
364
|
+
self->_instanceCallbackRegistered = false;
|
|
365
|
+
}
|
|
366
|
+
void (^removeBlock)() = ^() {
|
|
367
|
+
if (![@"" isEqualToString:self->_windowName]) {
|
|
368
|
+
// Only remove if it is not the main window
|
|
369
|
+
if (self->_renderingLayer) {
|
|
370
|
+
if (self->_renderingLayer.superlayer == self.layer) {
|
|
371
|
+
// Only remove, if it is our sublayer
|
|
372
|
+
[self->_renderingLayer removeFromSuperlayer];
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
} else {
|
|
376
|
+
// If it is the main window, then request removal from the manager
|
|
377
|
+
[RTNGodotView removeMainLayerFromGodotView:self];
|
|
378
|
+
}
|
|
379
|
+
self->_windowId = 0;
|
|
380
|
+
self->_renderingLayer = nullptr;
|
|
381
|
+
self->_lastRequestedPixelSize = godot::Vector2i();
|
|
382
|
+
++self->_resizeGeneration;
|
|
383
|
+
if (addAfter) {
|
|
384
|
+
[self addToGodotView];
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
if ([NSThread isMainThread]) {
|
|
388
|
+
removeBlock();
|
|
389
|
+
} else {
|
|
390
|
+
if (!unregister) {
|
|
391
|
+
// This should only happen when the Godot instance is being stopped
|
|
392
|
+
dispatch_sync(dispatch_get_main_queue(), ^{
|
|
393
|
+
removeBlock();
|
|
394
|
+
});
|
|
395
|
+
} else {
|
|
396
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
397
|
+
removeBlock();
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
- (void)layoutSubviews {
|
|
404
|
+
[super layoutSubviews];
|
|
405
|
+
|
|
406
|
+
godot::GodotInstance *instance = GodotModule::get_singleton()->get_instance();
|
|
407
|
+
|
|
408
|
+
if (!instance || !instance->is_started()) {
|
|
409
|
+
// Cannot continue without a Godot instance
|
|
410
|
+
NSLog(@"RTNGodotView: layoutSubviews: No Godot Instance Running");
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
if (!_windowId || !_renderingLayer) {
|
|
415
|
+
NSLog(@"RTNGodotView: layoutSubviews: No window configured");
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
CGSize renderingSize = self.bounds.size;
|
|
420
|
+
if (renderingSize.width <= 0 || renderingSize.height <= 0) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
double contentScaleFactor = GodotModule::get_singleton()->get_content_scale_factor();
|
|
425
|
+
CGRect renderingFrame = CGRectMake(0, 0, renderingSize.width, renderingSize.height);
|
|
426
|
+
uint64_t windowId = _windowId;
|
|
427
|
+
godot::Vector2i pixelSize(
|
|
428
|
+
godot::MAX(1, (int32_t)std::lround(renderingSize.width * contentScaleFactor)),
|
|
429
|
+
godot::MAX(1, (int32_t)std::lround(renderingSize.height * contentScaleFactor)));
|
|
430
|
+
|
|
431
|
+
[CATransaction begin];
|
|
432
|
+
[CATransaction setDisableActions:YES];
|
|
433
|
+
_renderingLayer.frame = renderingFrame;
|
|
434
|
+
[CATransaction commit];
|
|
435
|
+
|
|
436
|
+
if (_lastRequestedPixelSize == pixelSize) {
|
|
437
|
+
return;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
_lastRequestedPixelSize = pixelSize;
|
|
441
|
+
const uint64_t attachmentGeneration = _attachmentGeneration;
|
|
442
|
+
const uint64_t resizeGeneration = ++_resizeGeneration;
|
|
443
|
+
CALayer *renderingLayer = _renderingLayer;
|
|
444
|
+
|
|
445
|
+
[CATransaction begin];
|
|
446
|
+
[CATransaction setDisableActions:YES];
|
|
447
|
+
renderingLayer.hidden = YES;
|
|
448
|
+
[CATransaction commit];
|
|
449
|
+
|
|
450
|
+
GodotModule::get_singleton()->runOnGodotThread([=]() {
|
|
451
|
+
godot::DisplayServerEmbedded *dse = godot::DisplayServerEmbedded::get_singleton();
|
|
452
|
+
if (dse && godot::UtilityFunctions::is_instance_id_valid(windowId)) {
|
|
453
|
+
godot::Object *obj = godot::UtilityFunctions::instance_from_id(windowId);
|
|
454
|
+
godot::Window *window = godot::Object::cast_to<godot::Window>(obj);
|
|
455
|
+
if (window) {
|
|
456
|
+
dse->resize_window(pixelSize, window->get_window_id());
|
|
457
|
+
// Render one frame at the new size before exposing the layer. Without
|
|
458
|
+
// this barrier iOS briefly composites the previous framebuffer into
|
|
459
|
+
// the new host bounds, which appears as a frozen bottom-left image.
|
|
460
|
+
GodotModule::get_singleton()->iterate();
|
|
461
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
462
|
+
if (!self->_isMounted ||
|
|
463
|
+
self->_attachmentGeneration != attachmentGeneration ||
|
|
464
|
+
self->_resizeGeneration != resizeGeneration ||
|
|
465
|
+
self->_windowId != windowId ||
|
|
466
|
+
self->_renderingLayer != renderingLayer) {
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
[CATransaction begin];
|
|
471
|
+
[CATransaction setDisableActions:YES];
|
|
472
|
+
renderingLayer.hidden = NO;
|
|
473
|
+
[CATransaction commit];
|
|
474
|
+
|
|
475
|
+
if (self->_eventEmitter) {
|
|
476
|
+
static_cast<const RTNGodotViewEventEmitter &>(*self->_eventEmitter).onSurfaceReady({});
|
|
477
|
+
}
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
});
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
- (int)getTouchId:(UITouch *)touch {
|
|
485
|
+
int first = -1;
|
|
486
|
+
for (int i = 0; i < MAX_TOUCH_COUNT; ++i) {
|
|
487
|
+
if (first == -1 && (i >= _touches.size() || _touches[i] == nil)) {
|
|
488
|
+
first = i;
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
if (_touches[i] == touch) {
|
|
492
|
+
return i;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
if (first != -1) {
|
|
497
|
+
_touches[first] = touch;
|
|
498
|
+
return first;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
return -1;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
- (void)removeTouchId:(int)touchId {
|
|
505
|
+
_touches[touchId] = nil;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
- (void)touchesBegan:(NSSet<UITouch *> *)touches
|
|
509
|
+
withEvent:(UIEvent *)event {
|
|
510
|
+
godot::GodotInstance *instance = GodotModule::get_singleton()->get_instance();
|
|
511
|
+
|
|
512
|
+
if (!instance || !instance->is_started()) {
|
|
513
|
+
NSLog(@"RTNGodotView: touchesBegan: No Godot instance started");
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
if (!_windowId) {
|
|
517
|
+
NSLog(@"RTNGodotView: touchesBegan: No window configured");
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
godot::DisplayServerEmbedded *dse = godot::DisplayServerEmbedded::get_singleton();
|
|
521
|
+
if (!dse) {
|
|
522
|
+
NSLog(@"RTNGodotView: touchesBegan: No Godot DisplayServer instance");
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
for (UITouch *touch in touches) {
|
|
526
|
+
int touchId = [self getTouchId:touch];
|
|
527
|
+
if (touchId == -1) {
|
|
528
|
+
continue;
|
|
529
|
+
}
|
|
530
|
+
CGPoint location = [touch locationInView:self];
|
|
531
|
+
if (!CGRectContainsPoint(_renderingLayer.frame, location)) {
|
|
532
|
+
continue;
|
|
533
|
+
}
|
|
534
|
+
location.x -= _renderingLayer.frame.origin.x;
|
|
535
|
+
location.y -= _renderingLayer.frame.origin.y;
|
|
536
|
+
NSUInteger tapCount = touch.tapCount;
|
|
537
|
+
double contentScaleFactor = GodotModule::get_singleton()->get_content_scale_factor();
|
|
538
|
+
GodotModule::get_singleton()->runOnGodotThread([=]() {
|
|
539
|
+
if (godot::UtilityFunctions::is_instance_id_valid(_windowId)) {
|
|
540
|
+
godot::Object *obj = godot::UtilityFunctions::instance_from_id(_windowId);
|
|
541
|
+
godot::Window *window = godot::Object::cast_to<godot::Window>(obj);
|
|
542
|
+
dse->touch_press(touchId, location.x * contentScaleFactor, location.y * contentScaleFactor, true, tapCount > 1, window->get_window_id());
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
- (void)touchesMoved:(NSSet<UITouch *> *)touches
|
|
549
|
+
withEvent:(UIEvent *)event {
|
|
550
|
+
godot::GodotInstance *instance = GodotModule::get_singleton()->get_instance();
|
|
551
|
+
|
|
552
|
+
if (!instance || !instance->is_started()) {
|
|
553
|
+
NSLog(@"RTNGodotView: touchesMoved: No Godot instance started");
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
if (!_windowId) {
|
|
557
|
+
NSLog(@"RTNGodotView: touchesMoved: No window configured");
|
|
558
|
+
return;
|
|
559
|
+
}
|
|
560
|
+
godot::DisplayServerEmbedded *dse = godot::DisplayServerEmbedded::get_singleton();
|
|
561
|
+
if (!dse) {
|
|
562
|
+
NSLog(@"RTNGodotView: touchesMoved: No Godot DisplayServer instance");
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
for (UITouch *touch in touches) {
|
|
566
|
+
int touchId = [self getTouchId:touch];
|
|
567
|
+
if (touchId == -1) {
|
|
568
|
+
continue;
|
|
569
|
+
}
|
|
570
|
+
CGPoint location = [touch locationInView:self];
|
|
571
|
+
if (!CGRectContainsPoint(_renderingLayer.frame, location)) {
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
location.x -= _renderingLayer.frame.origin.x;
|
|
575
|
+
location.y -= _renderingLayer.frame.origin.y;
|
|
576
|
+
CGPoint prevLocation = [touch previousLocationInView:self];
|
|
577
|
+
if (!CGRectContainsPoint(_renderingLayer.frame, prevLocation)) {
|
|
578
|
+
continue;
|
|
579
|
+
}
|
|
580
|
+
prevLocation.x -= _renderingLayer.frame.origin.x;
|
|
581
|
+
prevLocation.y -= _renderingLayer.frame.origin.y;
|
|
582
|
+
CGFloat alt = touch.altitudeAngle;
|
|
583
|
+
CGVector azim = [touch azimuthUnitVectorInView:self];
|
|
584
|
+
CGFloat force = touch.force;
|
|
585
|
+
CGFloat maximumPossibleForce = touch.maximumPossibleForce;
|
|
586
|
+
double contentScaleFactor = GodotModule::get_singleton()->get_content_scale_factor();
|
|
587
|
+
GodotModule::get_singleton()->runOnGodotThread([=]() {
|
|
588
|
+
if (godot::UtilityFunctions::is_instance_id_valid(_windowId)) {
|
|
589
|
+
godot::Object *obj = godot::UtilityFunctions::instance_from_id(_windowId);
|
|
590
|
+
godot::Window *window = godot::Object::cast_to<godot::Window>(obj);
|
|
591
|
+
dse->touch_drag(
|
|
592
|
+
touchId,
|
|
593
|
+
prevLocation.x * contentScaleFactor,
|
|
594
|
+
prevLocation.y * contentScaleFactor,
|
|
595
|
+
location.x * contentScaleFactor,
|
|
596
|
+
location.y * contentScaleFactor,
|
|
597
|
+
force / maximumPossibleForce,
|
|
598
|
+
godot::Vector2(azim.dx * cos(alt), azim.dy * cos(alt)),
|
|
599
|
+
window->get_window_id());
|
|
600
|
+
}
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
- (void)touchesEnded:(NSSet<UITouch *> *)touches
|
|
606
|
+
withEvent:(UIEvent *)event {
|
|
607
|
+
godot::GodotInstance *instance = GodotModule::get_singleton()->get_instance();
|
|
608
|
+
|
|
609
|
+
if (!instance || !instance->is_started()) {
|
|
610
|
+
NSLog(@"RTNGodotView: touchesEnded: No Godot instance started");
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
if (!_windowId) {
|
|
614
|
+
NSLog(@"RTNGodotView: touchesEnded: No window configured");
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
godot::DisplayServerEmbedded *dse = godot::DisplayServerEmbedded::get_singleton();
|
|
618
|
+
if (!dse) {
|
|
619
|
+
NSLog(@"RTNGodotView: touchesEnded: No Godot DisplayServer instance");
|
|
620
|
+
return;
|
|
621
|
+
}
|
|
622
|
+
for (UITouch *touch in touches) {
|
|
623
|
+
int touchId = [self getTouchId:touch];
|
|
624
|
+
if (touchId == -1) {
|
|
625
|
+
continue;
|
|
626
|
+
}
|
|
627
|
+
[self removeTouchId:touchId];
|
|
628
|
+
CGPoint location = [touch locationInView:self];
|
|
629
|
+
if (!CGRectContainsPoint(_renderingLayer.frame, location)) {
|
|
630
|
+
continue;
|
|
631
|
+
}
|
|
632
|
+
location.x -= _renderingLayer.frame.origin.x;
|
|
633
|
+
location.y -= _renderingLayer.frame.origin.y;
|
|
634
|
+
double contentScaleFactor = GodotModule::get_singleton()->get_content_scale_factor();
|
|
635
|
+
GodotModule::get_singleton()->runOnGodotThread([=]() {
|
|
636
|
+
if (godot::UtilityFunctions::is_instance_id_valid(_windowId)) {
|
|
637
|
+
godot::Object *obj = godot::UtilityFunctions::instance_from_id(_windowId);
|
|
638
|
+
godot::Window *window = godot::Object::cast_to<godot::Window>(obj);
|
|
639
|
+
dse->touch_press(touchId, location.x * contentScaleFactor, location.y * contentScaleFactor, false, false, window->get_window_id());
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
- (void)touchesCancelled:(NSSet<UITouch *> *)touches
|
|
646
|
+
withEvent:(UIEvent *)event {
|
|
647
|
+
godot::GodotInstance *instance = GodotModule::get_singleton()->get_instance();
|
|
648
|
+
|
|
649
|
+
if (!instance || !instance->is_started()) {
|
|
650
|
+
NSLog(@"RTNGodotView: touchesCancelled: No Godot instance started");
|
|
651
|
+
return;
|
|
652
|
+
}
|
|
653
|
+
if (!_windowId) {
|
|
654
|
+
NSLog(@"RTNGodotView: touchesCancelled: No window configured");
|
|
655
|
+
return;
|
|
656
|
+
}
|
|
657
|
+
godot::DisplayServerEmbedded *dse = godot::DisplayServerEmbedded::get_singleton();
|
|
658
|
+
if (!dse) {
|
|
659
|
+
NSLog(@"RTNGodotView: touchesCancelled: No Godot DisplayServer instance");
|
|
660
|
+
return;
|
|
661
|
+
}
|
|
662
|
+
for (UITouch *touch in touches) {
|
|
663
|
+
int touchId = [self getTouchId:touch];
|
|
664
|
+
if (touchId == -1) {
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
[self removeTouchId:touchId];
|
|
668
|
+
GodotModule::get_singleton()->runOnGodotThread([=]() {
|
|
669
|
+
if (godot::UtilityFunctions::is_instance_id_valid(_windowId)) {
|
|
670
|
+
godot::Object *obj = godot::UtilityFunctions::instance_from_id(_windowId);
|
|
671
|
+
godot::Window *window = godot::Object::cast_to<godot::Window>(obj);
|
|
672
|
+
dse->touches_canceled(touchId, window->get_window_id());
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
- (void)willMoveToSuperview:(UIView *)newSuperview {
|
|
679
|
+
[super willMoveToSuperview:newSuperview];
|
|
680
|
+
NSLog(@"RTNGodotView: %@ will move to superview %@", self, newSuperview);
|
|
681
|
+
_isMounted = newSuperview != nil;
|
|
682
|
+
if (newSuperview == nil) {
|
|
683
|
+
[self removeFromGodotView:false unregister:true];
|
|
684
|
+
} else {
|
|
685
|
+
[self addToGodotView];
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps {
|
|
690
|
+
[super updateProps:props oldProps:oldProps];
|
|
691
|
+
|
|
692
|
+
// Handle your props here
|
|
693
|
+
if (props != nullptr &&
|
|
694
|
+
(oldProps == nullptr ||
|
|
695
|
+
std::static_pointer_cast<RTNGodotViewProps const>(oldProps)->windowName !=
|
|
696
|
+
std::static_pointer_cast<RTNGodotViewProps const>(props)->windowName)) {
|
|
697
|
+
const auto &newViewProps = *std::static_pointer_cast<RTNGodotViewProps const>(props);
|
|
698
|
+
[self setWindowName:[NSString stringWithUTF8String:newViewProps.windowName.c_str()]];
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
- (void)didMoveToSuperview {
|
|
703
|
+
[super didMoveToSuperview];
|
|
704
|
+
NSLog(@"RTNGodotView: %@ did move to superview %@", self, self.superview);
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
+ (ComponentDescriptorProvider)componentDescriptorProvider {
|
|
708
|
+
return concreteComponentDescriptorProvider<RTNGodotViewComponentDescriptor>();
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
@end
|