このエラーがうざい
やり方あった https://www.reddit.com/r/godot/comments/16d15in/error_when_trying_to_export_project_on_android/
Enable this setting: Project >> Project Settings... >> General >> Rendering >> Textures >> VRAM Compression >> Import ETC2 ASTC
このエラーがうざい
やり方あった https://www.reddit.com/r/godot/comments/16d15in/error_when_trying_to_export_project_on_android/
Enable this setting: Project >> Project Settings... >> General >> Rendering >> Textures >> VRAM Compression >> Import ETC2 ASTC
/// Swaps the display order of two child view controllers within their parent view controller. /// /// This method is used to adjust the z-ordering of the views associated with two child view controllers. /// It's particularly useful when the two child view controllers are embedded in a common parent view controller and you want to change which one appears on top. /// /// - Note: /// This method will only adjust the order if both view controllers are children of the same parent view controller. /// If they aren't, the method will have no effect. /// /// - Parameters: /// - vc1: The first view controller whose display order you want to swap. /// - vc2: The second view controller whose display order you want to swap. /// /// - Usage: /// Assuming `self` is the parent view controller: /// ``` /// self.swapViewControllerOrder(childVC1, childVC2) /// ``` func swapViewControllerOrder<T1: UIViewController, T2: UIViewController>(_ vc1: T1, _ vc2: T2) { if let firstIndex = self.children.firstIndex(where: { $0 is T1 }), let secondIndex = self.children.firstIndex(where: { $0 is T2 }) { let firstViewFrame = vc1.view.frame UIView.animate(withDuration: 1, animations: { vc1.view.frame = vc2.view.frame vc2.view.frame = firstViewFrame self.view.exchangeSubview(at: firstIndex, withSubviewAt: secondIndex) }) } }
使い方
UIViewController
のカスタムクラスなどで、
self.swapViewControllerOrder(1つ目のVC, 2つ目のVC)
Unable to install iOS 17 Simulator runtimeみたいなエラーが出た。
https://developer.apple.com/forums/thread/737648
iOS_17_Simulator_Runtime.dmg
をダウンロードする。
その後ダウンロードしたフォルダで以下のコマンド。
xcrun simctl runtime add iOS_17_Simulator_Runtime.dmg
Godot(ゴドー)試す。
を参考にした。
ダウンロード https://godotengine.org/download/macos/
2つあった。.NETなしでいいや。
Godot Engine with .NET Support:
.NETを使用してスクリプトを書くことができます(主にC#)。 C#のライブラリやツールを利用できます。 .NETの知識や経験がある場合は、こちらのバージョンが推奨されます。
Standard Godot Engine (without .NET):
主にGDScript(Godot独自のスクリプト言語)を使用してスクリプトを書きます。 GDScriptはPythonに似ており、学びやすいとされています。 .NETのサポートが不要な場合、このバージョンがシンプルで良いかもしれません。
スクプリプトアイコン スクプリプトアイコンは左にあった。
Godot 4.0では「onready」はアノテーション扱いとされ「@onready
」と書き方が変わります。
とのこと
yield
も await
になった。
var _text := "Good night World" #最終的に表示するテキストを定義 # await(get_tree().create_timer(1.0),"timeout") #指定秒待たせる処理 # _label.set_text(_text) await get_tree().create_timer(1.0).timeout _label.set_text(_text)
記事のルートノードを選択した状態でというのは Control
を選択したってこと。
func _ready(): var _text := "Good night World" #最終的に表示するテキストを定義 var _time := 0.1 #待ち時間 _label.set_text("") #Labelのテキストを初期化 _label.set_text(_text) for i in range(_text.length()): #文字数分繰り返し処理 _label.set_text(_text.left(i+1)) #i+1より左にある文字を設定 await get_tree().create_timer(_time).timeout #指定時間待つ
4.0になって変わった。
export
や範囲指定も変わっている。
# export(String) var _text := "" @export var _text: String = "" # export(float, 0, 1) var _time := 0.1 @export_range (0, 1) var _time:float = 0.1
extends Control # export(String) var _text := "" @export var _text: String = "" # export(float, 0, 1) var _time := 0.1 @export_range (0, 1) var _time:float = 0.1 @onready var _label := $Label #子ノードのLabelを取得 #@onready var _label := $Panel/Label #孫ノードのLabelを取得 # Called when the node enters the scene tree for the first time. #func _ready(): # _label.set_text("Morning world") #Labelにテキストを指定 # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta): pass func _on_button_pressed(): #var _text := "Good night World" #最終的に表示するテキストを定義 # var _time := 0.1 #待ち時間 _label.set_text("") #Labelのテキストを初期化 _label.set_text(_text) for i in range(_text.length()): #文字数分繰り返し処理 _label.set_text(_text.left(i+1)) #i+1より左にある文字を設定 await get_tree().create_timer(_time).timeout #指定時間待つ