HaxeFlixel Trace - trace

Day one HaxeFlixel Coder. Stupid error, but Google isn't helping me.
How do I trace to FlashDevelop output using Haxe, NME and Flixel. It works when executing using C++, but nothing for Flash!
I've tried
trace("hello");
Lib.trace("hello"); //With correct imports
Sorry, feeling so stupid right now!

The traces for the flash target appear on the player itself since flashplayer cannot redirect them to the flashdevelop output. The work-around is that use neko target while developing and once development completed, remove any traces and compile to flash.

You probably don't have a "debug" Flash Player associated with SWF files on your system. That's needed for OpenFL projects (by opposition with regular Flash projects managed by flashDevelop).
First make sure you have one installed:
in FlashDevelop select Tools > Install Software...
choose Flash Player SA (stand alone debug Flash player)
restart FlashDevelop.
Sadly for some complicated reason it isn't possible yet for FlashDevelop to tell OpenFL what Flash player to use even if you have it installed that way, so the next step is needed:
Associate the Flash player:
in FlashDevelop select Tools > Program Settings...
look up the path in FlashViewer plugin > External Player path
now in a Window Explorer, locate some SWF file and associate this player executable with SWF files,
when you double-click a SWF in Window Explorer it should open this program,
verify when you right-click on the player that it has a "Debugger" item in the context menu.
Retry launching your OpenFL project in FlashDevelop, you should see the traces in the Output.
PS: to completely disable traces for release, edit your project.xml and add:
<haxeflag name="--no-traces" />

While not specifically a solution to your problem, a tip I may have is that I have my development profile have .swf files associated w/ standalone debug flash player (Operating System wide), and build debug instead of release in Flash Develop.

Related

Reload Scripts Assemblies (busy for long time) Unity Freezes

I'm Using Unity version 2020.3.32f1 & Rider as Editor. Whenever I make any changes in scripts, even small changes, Unity script assemblies take too much of time to compile and load. Sometimes it freezes Unity entirely and in the Task Manager I can see "application not responding" for the Unity session.
Does anyone know how I can solve this issue?
Disable Domain Reloading. To disable Domain Reloading:
Go to Edit > Project Settings > Editor
Make sure Enter Play Mode Options is enabled.
Disable Reload Domain
source https://docs.unity3d.com/Manual/DomainReloading.html
Edit > Project Settings > Editor > Check Enter Play Mode Options
Uncheck reload domain & reload scene
That worked for me .. unity 2021.3.4f1
After so much of research, I got one solution which worked for me , in Unity Package manager , Search for Rider & got Update for rider. After Updating Rider version from unity package manager. my Scripts reloading issue got fixed.
The Windows version of UnityEditor also has this problem.
Weirdly, if you have this problem, just save any file in your Unity project folder without changing anything and the progress bar will start progressing.
Open Window->Package Manager. Select Packages: In Project to see the packages currently installed. Remove everything you are not using.
Not being logged in in the Unity editor (upper left corner) certainly seems to increase the chances of this issue happening.
If you open the Package Manager without being logged in you get some errors in the console. I suspect this is related but in the script reload case it just hangs.

Disabling/Deactivating scripts in the Unity MonoDevelop

I have a folder in my Unity's Assets directory that contains several scripts with errors and missing directives, etc...
So, I looked for a way of getting Unity to disregard all those scripts until I have found the directives and solution...
I found out that in MonoDevelop, I could click on the little Settings icon that appears to the right of every script (on the Solution viewpad) and change their setting from Compile to None, but this still does not exclude them from being compiled, so I still get error messages that prevent me from running my Unity app.
Is there another way of doing this, without having to cut that directory out of my Unity project through windows explorer?
As far as I know - no, you can not do that: http://forum.unity3d.com/threads/excluding-unreferenced-scripts-from-builds.13406/
Because it's a development issue, you can just comment out all the code in those scripts. Ctrl/Cmd + A, then Ctrl/Cmd + /.

How to run my code on an ARM _without_ debugging?

I've been developing a project (in C) for an STM32F105, using the Eclipse IDE with CDT plugins. I'm using the gcc-arm toolchain, OpenOCD (gdb) for debugging, and an ST-Link/V2 JTAG device.
I've been debugging on my target board, no problems.
Now, I finally want the code to run by itself, and I don't know how to do it in Eclipse! I'm sure it's simple, but I can't find it.
How do I build the code and program my target so that it runs "normally"?
Configure OpenOCD as external tool and use arguments more or less like these:
-f interface/... -f target/... -c "init; reset init; flash write_image erase <your_hex_file.hex>; reset run; shutdown;"
You should of course adapt this command to your project: enter proper interface and target configs and set right name of hex file (you can also use .bin or .elf, but .hex is usually the most convenient).
In the "Working Directory" textbox enter your project directory - use "Browse Workspace" to do that, you should have sth like this there: ${workspace_loc:/<name_of_your_project>}
One of my projects worked by simply disconnecting the debugger and resetting the target, as suggested by #ChrisStratton. The other didn't, whether I used the IDE or the ST-LINK tools. It worked fine when the debugger was attached.
It turns out that the non-working program was using semi-hosting. When I disabled semi-hosting by removing the following compiler symbols, the project started running just fine on its own.

Facebook SDK for Unity slow settings screen

I'm using the Facebook SDK for Unity v5.04 (also tried 5.03) and whenever I open the FacebookSettings panel in the inspector I get ridiculous slowdown to the point that I can't even use Unity. This only happens when I do that, does anyone know what might be wrong? I've tried it on multiple computers now and all have been experiencing this lag.
I am getting this same thing. I don't think this is happening to every project or the FB team would have noticed prior to pushing the builds out.
As far as I can tell, it only happens on larger projects. We have seen this same behavior in other plugins (namely one that one of our developers wrote) when the plugin tried to scan the project for a file of a specific name. It didn't show up in his tests but in large projects it made Unity almost unusable.
I tested the Facebook settings issue on a brand new project and it's fast.
Potential Solution Delete everything in your project except Facebook ;)
Edit: The settings menu appears to work just fine on a Mac. I have the same project on my PC and Mac (and the PC's specs are far better than the Mac's) yet it brings Unity to a crawl on the PC and it works fine on the Mac. Go figure :S
OP: If you add the SDK to a new project, or Facebook's sample project, do you see the same issue? Also, could you update with the Unity version you're using, so we can explore? Thanks!
I have the same problem
but when I follow this Link that solve "[Open SSL not found]" Problem >> The slow problem was disappeared.
this is the steps that I was follow:
1) Download and install OpenSSL. http://slproweb.com/products/Win32OpenSSL.html
Win32 OpenSSL v#.#.# (not Light)
OR Win64 OpenSSL v#.#.# (not Light)
2) Add the OpenSSL directory to your path.
Go to: Control Panel > System > Advanced system settings > Environment Variables
Select the Variable "Path" in the "System variables" window and click Edit.
3) Add the path to your OpenSSL bin folder to the end of the "Variable value" text. e.g. I added ";C:\Program Files\OpenSSL-Win64\bin" to the end of the value text.
Restart Unity3D.
take note do not forget to add semi-colon ";" before the C:/
4) If you get the error in FacebookSettings "Keytool not found", you need to add the JDK (Java Development Kit) bin directory to the Path variable value.
5) Follow the same steps as before, but instead of the OpenSSL bin path, add the JDK bin path. e.g. I added ";C:\Program Files\Java\jdk1.7.0_45\bin" to the end of the value text.
Restart Unity3D.

Eclipse #ifdef error using JNI, Android NDK and Vuforia

With Vuforia's ImageTargets sample application, I tried using OpenGL ES 1.1 by setting USE_OPENGL_ES_1_1 to true in jni/Android.mk and uncommenting and changing the corresponding line in AndroidManifest.xml (). After converting the project so that it has a C++ perspective and associating ndk-build and the proper include directories, I could successfully run the application on my Android device.
However, the problem is that once I open up jni/ImageTargets.cpp, I get several errors from Eclipse, all from places where OpenGL ES 2.0 code would execute, the first one being:
Description Resource Path Location Type Symbol 'vertexHandle' could
not be resolved ImageTargets.cpp /ImageTargets/jni line 402 Semantic
Error
Sure enough, vertexHandle is defined at the top of the ImageTargets.cpp, inside the "#ifdef USE_OPENGL_ES_2_0" block. Because USE_OPENGL_ES_2_0 is not defined (per Android.mk), the code should be able to compile successfully, and sure enough, ndk-build does not report any problems. So it seems that only Eclipse reports the problems and when I run the project, Eclipse says, "Your project contains error(s), please fix them before running your application." And thus, I cannot run my application anymore. In a sense, it's kind of strange that this never occurred until I opened ImageTargets.cpp and Eclipse "discovered" the errors.
The best work-around I've found so far is to just delete or comment out those lines (that should not be causing problems because USE_OPENGL_ES_2_0 is not supposed to be defined)... Is there a better way to deal with this problem? Did I miss a setting in Eclipse that should solve this?
I've found a solution: go to the project properties -> C/C++ Build -> Discovery Options -> Check "Automate discovery of paths and symbols"