Jump to content

No return from SetTexture


Recommended Posts

Hi,

I have an (for me) odd situation, which I' sure is caused by my ignorance.

I have the following code in the update() function:


Debug.Log ("Before MainMenuGui.AS_Button.SetTexture on");
MainMenuGui.AS_Button.SetTexture (MainMenuGui.AS_button_alert);
Debug.Log ("After MainMenuGui.AS_Button.SetTexture");

This is called when the F6 key is pressed. The SetTexture call works, I see the button change.

My problem is that it never returns from the SetTexture call, so that the flag which gets set after it isn't set and the rest of the mod doesn't work.

I added a logging statement at the beginning of the update function to display the flag, and I see that it is never set.

When the game is exited, then it returns and I get the messages in the log file.

What would prevent Unity from returning from the SetTexture call?

Thanks in advance

LGG

Edited by linuxgurugamer
Link to comment
Share on other sites

KSP.log is buffered. The game write it when it has more than a set size to write. If you want to see a real time log you have to open the KSP_Data\output_log.txt

OK. But when I put a debug statement at the beginning of Update(), it shows that the flag which is set immediately following the SetTexture is not set, and that shows up in the log very quickly.

When I exit the game, then I see the SetTexture message in the log.

How do I write to the output_log.txt? If it shows the same thing as the KSP.log, then why are there two log files?

Edited by linuxgurugamer
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...