Gizmos not being drawn until GameObject selected

I have implemented Scene loading in my game and have three scenes: Persistent, Main Menu and Game

By default, the player is loaded into the Persistent scene, which immediately loads the Main Menu, and when the player clicks on Play, Main Menu is unloaded and Game is loaded.

Now, the two active scenes are Persistent and Game.

However, I have a script with OnDrawGizmos on a GameObject in the Game scene. It seems that by default gizmos only begin to be drawn when I click on that GameObject, sort of activating it, and everything works fine. This used to just work before because Game was my only scene and Unity automatically selected that first GameObject. Now, with multiple scenes, no GameObject is selected by default and my gizmos won’t draw until I manually click on it.

How can I solve this?

How to select selected Html Drop Down and paste it automatically into a Contact Form

first of all its my first question in Stackoverflow, because im hardstuck in a problem right now. So hopefully someone can help me with that.

The project: I am building a Product Configurator for a Website. The main goal is, that customers can configurate their product and the options they selected are automatically placed in a Contact Form.

I am working on WordPress with Elementor. The Plugin I used for the configurator is: "Woocommerce Extra Product options"

My Problem: I need to get the ID’s of the specific selected containers and fill the text of the containers automatically in the Form down below.

The site:

Does anyone know how i can do this? Maybe in a .php file? Or in elementor? I did some massive CSS on the site, so that it looks like it is right now. This Selector is to select all containers of the Dropdowns.

.tc-extra-product-options .cpf-type-select .tmcp-field-wrap label.fullwidth select{ color: red; } What i also tried is to use Elementors Html Code-widget to get the variable of the specific Id of a container.

This didnt work: the output is "undefined"

var e = document.getElementById(“tmcp_select_160362915b5ef2”); var strUser = e.options[e.selectedIndex].text; document.write(strUser) I hope someone has an idea on this.

thanks in advance


PS: The site could look a bit messy i am sorry for that

Counter for selected dofollow / nofollow link types and titles

Hello guys! of GSA SER
I would like to ask for 2 requests to implement in GSA SER as I see that feature is not yet integrated. It would be a great help visually.
1. Know how many Dofollow links exist in my verified records, see image:

You can only see dofollow sites with an X, but you cannot see the “exact” amount quickly. It would be great to add at the bottom how many follow / nofollow links exist.
2. Creation of titles.
I have observed that there is also not a counter for selected titles visually. View image:

It would be great to have a counter at the bottom every time a title is selected, to know how many titles I am selecting.

rewrite URL based on selected taxonomy for post page

I have a taxonomy called "group", and their values like "red", "blue", "green" (these are generating dynamic" no any fixed group value.

during post publish I am selecting "Group" for each post. 1 group for each post.

I want to add a rewrite URL for the post if the taxonomy is "red" or "blue" or "green" then the URL of that post should come like

"" or "" or ""

add_action( 'init', 'create_group_tax' ); function create_group_tax() {     register_taxonomy(              'group',              'post',               array( 'label' => 'Group',                      'hierarchical' => true                 )         ); }  add_rewrite_rule('^red/([^/]*)/?','index.php?group=$  matches[1]','top'); 

also, I want to make it regex rule "'^red/([^/]*)/?'" dynamic with selected taxonomy,this time just to make a test i added it as a static string.

result : Page not found. Nothing here – http://localhost/wordpress/red/my-test/

what do you suggest to do this?

How to sort wordpress posts already selected by WP_QUERY

English is not my first language, sorry 🙂

I need differend per paginate page sorting.

For exemple, I created the loop:

 $  qargs = array(                     'posts_per_page' => 15,                     'no_found_rows'  => true,                     'order' => 'DESC',                     'post_type' => 'post',                     'suppress_filters' => false,                     'orderby' => 'post_views', // here I order my posts by views                     'fields' => '',                     'date_query' => array(                         array(                             'after'     => '-7 days',                             'column' => 'post_date',                         ),                     ), posts_query = new WP_Query( $  qargs ); 

And now I can display 15 selected posts sorted by views like this:

if ( $  posts_query->have_posts() ): ?>                 while ( $  posts_query->have_posts() ):                     $  posts_query->the_post(); ....... 

But I need to select 15 most viewed posts and after that to sort them by date.

Is it possible?

Thank you!

Column in query should be selected according to value from another column

Assuming I have table1 with following data:


id| coffee_sender | coffee_receiver | received_bag_size | sent_bag_size| price | 21  tux              -1                  m                 -1            45  22  alsa            -1                  -1                 xl            36 23  -1               tux                 l                 -1            51 

And I use the following query:

select t1.* from ( select t.price, from table1 t  where coffee_sender in (tux, alsa)  or coffee_receiver in (tux, alsa) and received_bag_size in (m, xl) or sent_bag_size in (m, xl)) t1 

What i want is to only fetch the rows that have coffee_sender/coffee_receiver AND sent_bag_size/received_bag_size filled with a value (rows that match the following conditions):

coffee_sender = tux, sent_bag_size= xl 


coffee_receiver = tux, received_bag_size= m 


coffee_sender = tux, sent_bag_size = xl AND coffee_receiver = tux, received_bag_size= m 

So id = 21 would be excluded from the example table1.

How can i update the above query for this ? Thank you in advance.

Hide ‘add to cart’ when certain value in dropdown is selected

Need help here please. I am trying to hide the ‘add to cart’ woocommerce button when a user selects a specific item in a dropdown list. I have tried multiple JQuery snippets in both functions.php and through 3rd party plugins but am still struggling to get it to work.

In Functions.php theme file

function load_scripts() { ?>     <script type="text/javascript">     $  (document).ready(function(){         $  (document.getElementsByName("select-1574795073993")).change(function(){             $  ( "select option:selected").each(function(){                 if($  (this).attr("value")=="International"){                     $  (".single_add_to_cart_button").hide();                 }             });         }).change();     });     </script> <?php } add_action('wp_enqueue_scripts', 'load_scripts'); 

Please can someone assist with simple steps to 1) provide correct code, and 2) insert in the hosted plarform.

Much appreciated!

Are class skills picked before or after your character’s Background is selected?

In the Backgrounds section:

Each background gives a character proficiency in two skills. Skills are described in chapter 7. In addition, most backgrounds give a character proficiency with one or more tools. Tools and tool proficiencies are detailed in chapter 5. If a character would gain the same proficiency from two different sources, he or she can choose a different proficiency of the same kind (skill or tool) instead.

Could a Barbarian character being created, for instance, pick Athletics and Survival as his class skills, and then when selecting a background, pick Outlander (which grants proficiency in these two skills), and then using this rule, instead pick two skills from the whole skill list?

Or is your background chosen before class skill-proficiencies?

Reset sliders to default (zero) when a PopupMenu item is selected

I am setting up a UI with sliders that are enabled or disabled according to the item in a PopupMenu. I have been trying to figure out how to reset the sliders to the default value of zero when I select another item from the PopupMenu. After reading the documentation I think that Refresh should do the trick but I am missing something. It seems that after refresh the sliders need to be updated but I cannot figure out how. Can you help? Please see the mwe below. I am using v Thank you!


(* Initialization section *) dMin = -500; dMax = 500; dStep = 0.1; aMin = 0; aMax = 500; aStep = 0.1;  PopupMenu[Dynamic[tType], {   {0, 0, 1, 0, 0, 0} -> "t1",   {1, 0, 1, 1, 0, 0} -> "t2",   {1, 0, 1, 1, 1, 1} -> "t3",   {1, 1, 1, 1, 1, 1} -> "t4",   {2, 1, 1, 1, 0, 0} -> "t5",   {3, 1, 1, 1, 0, 0} -> "t6",   {0, 1, 1, 1, 0, 0} -> "t7",   {0, 1, 1, 1, 1, 1} -> "t8"}]  Manipulate[Grid[{    {"a", Slider[      Dynamic[aa], {If[tType[[1]] == 3 , 1.5 bb, dMin],        If[tType[[1]] == 2, 1.5 bb, If[1.5 bb <= dMax, dMax, 1.5*dMax]],        dStep}, Enabled -> tType[[1]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightBlue, ImageMargins -> 0]},    {"b", Slider[Dynamic[bb], {dMin, dMax, dStep},       Enabled -> tType[[2]] > 0,       Exclusions -> {If[tType[[2]] > 0, 0, None]},       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightBlue, ImageMargins -> 0]},(*     excludes zero from types 4 t0 8 *)    {"c", Slider[Dynamic[cc], {dMin, dMax, dStep},       Enabled -> tType[[3]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightBlue, ImageMargins -> 0]},    {"d", Slider[Dynamic[dd], {aMin, aMax, aStep},       Enabled -> tType[[4]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightBlue, ImageMargins -> 0]},    {"e", Slider[Dynamic[ee], {dMin, dMax, dStep},       Enabled -> tType[[5]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightMagenta, ImageMargins -> 0]},    {"f", Slider[Dynamic[ff], {aMin, aMax, aStep},       Enabled -> tType[[6]] > 0,       Appearance -> {Small, "UpArrow", "Labeled"},       Background -> LightMagenta, ImageMargins -> 0]}},   Frame -> Outer, ItemSize -> {{1, 21}}],   Dynamic[tType,    Refresh[{aa = 0, bb = 0, cc = 0, dd = 0, ee = 0, ff = 0},     TrackedSymbols :> {tType}]], AppearanceElements -> None] 

How to prevent XSS attack on selected window.location in javascript

This is my code where i have a userId in a method SwitchUser_Click. I need to prevent or somehow encode the return value from the switchUser_Click as it includes the UserId of a user vulnerable to XSS attack or redirects.

function SwitchUser_Click(containerElement, OnSuccess) {             var selecteduserId = $  ("select", containerElement).val();             var makeDefault = $  (":checkbox", containerElement).is(":checked");             window.location = "Default.aspx?uId=" + selecteduserId + "&userActive=" + (makeDefault ? "1" : "0");             OnSuccess();         } 

The belows code is called from aspx page by using Client.RegisterScript and passing the parameters. This is the only place SwitchUser_Click method is used.

function OpenSwitchUser(UserId,modCode,defUrl) {             defaultUrl = defUrl;             var options =             {                 controlUrl: "~/Controls/SwitchUserDialog.ascx",                 params: { uid:UserId, mod: modCode},                 top: 70,                 width: 600,                 height: 2500,                 OKCallback: SwitchUser_Click,                 InitCallback: SwitchUserDialog_Init,                 cancelCallback: SwitchUser_Close             };             $  .showControlDialog(options);         } 

I want to know how to encode my userId in the SwitchUser_Click method and decode it when its called. Or maybe there is some other way to do this . Thank you