Comments (10)
Hello,
Sorry there is not enough detail in your description to enable any sort of reasonable solution.
If something crashes, you hopefully should be able to get a stack trace at the C++ level out of it. Then it should tell you which line and what function it crashed on. You might want to start from there. Thanks
from creature_godot.
I'm having trouble getting a stack trace from Godot. When I get it, I'll update this.
Just to make sure, Creature should work with Godot-3.1.1 stable, right?
Also, I'm sorry if this wasn't the place to post this. Wasn't sure where else to ask.
from creature_godot.
Hello,
Yes I have it built and running in it. At least as far as I can tell.
from creature_godot.
Ok. Thanks. I'll continue my search on how to get Godot to produce an error for me.
from creature_godot.
I narrowed down the problem a bit.
Using your Godot3Demo with the owl scene. You can run in editor and it works. You can build .exe in res:// folder and it works, but if you build into a "Build" folder the project does exactly what my project does - crashes with no error.
If you move the owl.json file into the Build folder then it works. I believe this is the issue I saw on another issue.
I have in my export to include json files in export. So, it seems that the .exe cannot find the json file inside the pck file.
from creature_godot.
Ah yes, this has something to do with how Godot puts the asset files. The plugin itself probably does not decide where to get the files. So it could be an issue with Godot's asset path system...
from creature_godot.
I got everything working for a Windows build by moving things around in kinda a ugly but working way. I am now trying to export to Android. I'm having an issue with it. Have you tested exporting to Android?
from creature_godot.
Hello,
No I have not tried on Android. However I am providing some reference code for you, it might be useful in your current endevour .
Take a look at:
https://github.com/kestrelm/Creature_Godot/blob/master/creaturegodot3/creaturegodot/creaturegodot.cpp
In particular:
bool CreatureGodot::load_json(const String filename_in) { auto global_path = ProjectSettings::get_singleton()->globalize_path(filename_in); #ifdef _CREATURE_DEBUG std::cout<<"CreatureGodot::load_json() - Loading file: "<<global_path.utf8()<<std::endl; #endif std::string load_filename(global_path.utf8());
These are lines 99 to 105. Notice where it gets the filename from ( the input parameter filename_in ). The filename itself is set from:
void CreatureGodot::set_asset_filename(String filename_in) { auto retval = load_json(filename_in);
at line 482. This can be useful for you to customize and perhaps point the assets to some place you find more appropriate for your project.
from creature_godot.
@kestrelm maybe you can update your tutorial with this way. Because using res:// in android impossible and using user:// works for windows too. @sampenland
My Godot 3.1.1 builds works in windows 10 and android without any problem. Simply, I am adding json file to my build and copying it to user:// folder in runtime and using it from user:// (not res://) Follow this:
Go export->resource settings in Godot and add *.json to filters to export non-resource files (this will add your json file to res://) I mean you adding your json file to your build with this way.
But we need to export json file to user:// directory for access in correct way.
Create a root node (2d scene) attach a script for it:
extends Node2D
func _ready():
var dir = Directory.new()
dir.copy("res://some.json","user://some.json")
This script will copy your json from res:// to user:// in runtime (you can add some error handling, check file if exist or something like that if you want)
Now you can add creaturegodot node to your root node and use user://some.json instead of res://some.json in Assetfilename.
When you launch the game your json file will be copied to user:// and will work without any problem in android and windows builds (probably for mac and linux too). Plus, you don't have to put your json file next to your final exe. Because json file in your game already now.
You will find you json in this directory when you launch your game if you did the things correctly.
C:\Users{username}\AppData\Roaming\Godot\app_userdata{projectname}\some.json
I don't know android user:// directory location but it's working in same way.
IMPORTANT: Do not forget to enable Write External Storage permission in your android export settings ->Permissions (no write permission = no json)
My English is not perfect. If you feel like I am talking robotic and rude, I am sorry about it. Just trying to help :). If needed I can make a small example project.
from creature_godot.
Hello, is there a way to fix the issue here? So that the required files do not need to be copied to user:// and just use the files in res:// instead.
I plan on using this for my game, and it seems very bloated to copy a lot of animation files.
Would this be fixed?
from creature_godot.
Related Issues (20)
- Latest version does not seem to compile correctly. (Godot 3.0.5 Stable) HOT 3
- Godot compiling error (only happens when I add creaturegodot module) HOT 6
- Creature Node in Godot's 3D environment? HOT 1
- Issue while compiling the Creature Plugin with Godot 3.1 HOT 2
- Issue with 3.1.1 android compiling HOT 5
- Issue with 3.1.2 android compiling HOT 2
- Build fails with godot 3.2 HOT 5
- creature2d crashes godot entirely if you set it to a wrong file name HOT 18
- Missing tutorial for godot normal map HOT 1
- Color Flags aren't exported to JSON file HOT 4
- Creature module does not work with godot 3.3.2 HOT 2
- Shader Incompatibility
- blend_to_animation snaps instead of blending HOT 2
- [feature request] Translate/rotate bones via runtime code in game HOT 3
- Creature are unable to find json file in custom export template (WIN64 and probably all platforms) HOT 4
- Creature plugin should give to the user hability to cancel "print" to console HOT 1
- Some commit after 30 abr 2016 breaks preview animation in godot editor (Win764bit) HOT 8
- Ability to mix two animations in the runtime HOT 1
- Error building Godot 3.0 with creature module HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from creature_godot.