Skip to content

Commit ef2cf74

Browse files
authored
change doc links, add section abt getChildOfType
1 parent f550db3 commit ef2cf74

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tutorials/migrate-v4.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Migrating from Geode v3.x to v4.0
22

33
## Changes to `Result`
4+
[Link to the full docs](https://github.com/geode-sdk/result?tab=readme-ov-file#result)
45
* Result type has been rewritten from scratch, and it is now shared with many parts of the Geode codebase (Geode itself, TulipHook and matjson).
56
* Many methods removed or renamed:
67
* `value()` -> `unwrap()`
@@ -56,8 +57,14 @@ static Result<std::shared_ptr<SettingV3>> parse(std::string const&, std::string
5657
* No longer in cocos2d namespace
5758
* Can now be found in `Geode/ui/Layout.hpp`
5859
60+
## Changes to `getChildOfType`
61+
* Deprecated in 3.9.0, and now removed, use `CCNode::getChildByType<T>(int index)` instead:
62+
* `getChildOfType<CCLayer>(node, 1)` -> `node->getChildByType<CCLayer*>(1)`
63+
* You can use this regex pattern to quickly find and replace:
64+
* `getChildOfType<(.+?)>\((.+?),\s*(.+?)\)` and replace with `$2->getChildByType<$1>($3)`
65+
5966
## Changes to `matjson`
60-
[Link to the full docs](https://github.com/geode-sdk/json)
67+
[Link to the full docs](https://github.com/geode-sdk/json?tab=readme-ov-file#matjson)
6168
* Entire library rewritten to use `geode::Result`
6269
* See result section for tips on how to use Geode's Result class
6370
* Methods are now camel case to fit with rest of Geode's codebase

0 commit comments

Comments
 (0)