Change Text – Inside A button, inside a Canvas, inside a GameObject: Access all the texts inside of hierchy?

 //.... Gameobject tile; int count = 1; float posX = 0; float posY = 0; ....//  GameObject blueTile = (GameObject)Instantiate(Resources.Load("block_blue")); tile = (GameObject)Instantiate(blueTile, transform);  for loop {    ...    ...    tile.GetComponent().GetComponentInChildren().text = count.ToString();    tile.transform.position = new Vector2((float)posX, (float)posY);    count++; }  

enter image description here enter image description here

As you can see by the image. My line of thinking goes like this; I used to create Flash/AS3 Applications and Games. I have used a number of API’s and they usually have a lot in common. Unix, however, is very different and I may have not grasped the key concepts.

I want to access my PreFab, named in Assets/Resources (the root path)
“block_blue”

All I wan to do is set up a row and columns of a box with a number inside of it.

Before you go and ask, why the complicated mix of Objects? Well, Adobe had MovieClip and use of layers and also use of a timeline. Unix doesn’t seem to have this in setting up a Scene (the Stage in Flash).

So, I set up a block that looks like this (right of main image 66): It’s a Canvas, to hold a Button, the button has a text. To move the Canvas, I put the Canvas inside a GameObject. This, to me, is like a MovieClip in Flash API.

**GameObject > ButtonLight, Button > TextBlack, Text**

I need to access TextBlack and also Text. Pretty easy right? I’ve been at this for 4 days, many many hours.

EDIT: It seems that it is working, somewhat.
Looking at the reference photo and the Hierarchy reference, it looks like the blackText behind the blueText is changing as expected. But I cannot access the top BlueText. The Blue Text is also a child of type Text, but it’s a second (layer?) copy of the text inside of the Button. So, it’s getting the first Child Text, but how to access the second Text?

Canvas VS JPanel (Java)

Everyone says all the time – "Be careful to combine Canvas with Swing components, because it is a heavyweight component and Swing is lightweight". How exactly will this harm me? Maybe in very specific cases that do not even come to my mind, but currently Canvas is the best way to develop games in Java if you use Swing in my opinion. And the fact is, Minecraft is also painted on AWT’s Canvas. Correct me if I’m wrong. But right now what gives me more control is Canvas and not JPanel.

Should I use HTML5 canvas for a 2d image browser game / app?

Ok, I hope this hasn’t been asked, but I could not find one, especially nothing recent.

Quick Background: I’ve been away from programming for a couple of years and dusted off an old project to create a browser game that is already quite functional and I would like to complete, but actually as an IOS / Android app instead of a desktop browser game.

Current Technology Used: CodeIgniter framework, PHP, SQLite, Javascript / JQuery (and obviously HTML / CSS)

Very Basics of the Game: The game itself is basically a civilization build an empire type game. The game area is a background image inside of a DIV element with spaces to build things. Once “built” the buildings are isometric images that are absolutely floated with CSS and aligned over top of the background to appear where they were built in the city. I think that paints the picture, but basically those “buildings” (floated images) are also links that open up additional dialogs and give more game functionality.

Example of game layout

My Question: Keeping in mind that other than aligning the images properly over the background image, all of the images in my game are static.

  • Should I actually be using an HTML5 < canvas > element for this task?

  • Also does the UI get wrapped in the canvas too? (that’s maybe a separate question)

  • Should I use a html5 framework to work with the canvas?

  • Does any of this change if my goal is to publish on IOS / Android instead of desktop browser experience (I.e. apple review process)?

Or are both of these methods just the complete wrong approach? hah. I hope I’ve kept this as clear as possible and thank you for your time and input!!

P.S. I should also say my current strategy is to just keep programming it as a browser game (checking chrome dev tools to see how it looks on phone) and assume I can wrap it later. But if that’s wrong I want to get ahead of it.

Is there a way to program MMB to pan the canvas in Sketch.app?

I’ve been looking for a while for a way to program my MMB (Middle Mouse Button) to be able to pan the canvas in Sketch, similar to Invision Studio, without the need to hold spacebar.

I haven’t been able to find any plugins for this, and the Mac will only allow the programming of keybinds to keys.

Does anyone know of a plugin or software that will allow me to do this? Pressing spacebar is not difficult, but I am constantly switching between Studio and Sketch for designs, and the difference interrupts my workflow.

Here is the link to the Sketch documentation for canvas controls, for reference: https://www.sketch.com/docs/canvas/

Ps. I’m not sure if this is the correct forum for this question, but I am assuming that more people in the user experience field will have a familiarity with Sketch than standard SO. I use a 2017 Macbook Pro on Catalina.

I will post your topic or your canvas ad in 100 Saudi forums for $10

I will post your topic or ad in 100 Saudi forums will be in Saudi forums and this serviceNo person who wants to display his products, advertisements or topics to the population of Saudi Arabia will be published by manual subject will be published It will be a moderator in the 100 forums in the period of posting will be 4 days do not post topics Violation of Islamic law

by: mkasem5111979
Created: —
Category: Forums
Viewed: 177


I will post your topic or your canvas ad in 100 Saudi forums for $10

I will post your topic or ad in 100 Saudi forums will be in Saudi forums and this serviceNo person who wants to display his products, advertisements or topics to the population of Saudi Arabia will be published by manual subject will be published It will be a moderator in the 100 forums in the period of posting will be 4 days do not post topics Violation of Islamic law

by: mkasem5111979
Created: —
Category: Forums
Viewed: 177


I will post your topic or your canvas ad in 100 Saudi forums for $10

I will post your topic or ad in 100 Saudi forums will be in Saudi forums and this serviceNo person who wants to display his products, advertisements or topics to the population of Saudi Arabia will be published by manual subject will be published It will be a moderator in the 100 forums in the period of posting will be 4 days do not post topics Violation of Islamic law

by: mkasem5111979
Created: —
Category: Forums
Viewed: 177


I will post your topic or your canvas ad in 100 Saudi forums for $10

I will post your topic or ad in 100 Saudi forums will be in Saudi forums and this serviceNo person who wants to display his products, advertisements or topics to the population of Saudi Arabia will be published by manual subject will be published It will be a moderator in the 100 forums in the period of posting will be 4 days do not post topics Violation of Islamic law

by: mkasem5111979
Created: —
Category: Forums
Viewed: 177


Canvas doesn’t work on CLIP STUDIO

I’ve installed Clip Studio Paint using both playonlinux and wine, but in both cases i can’t use the pen/eraser tools, as the program won’t recognize them. Other tools like the bucket and line tool work well, but any type of brush doesn’t.

I asked on the wine forum to no avail, and i’m not sure what’s causing this problem. The bug appears to be “fixed” on the bug reports,despite me having encountered it in the latest version.

The tablet seems to work flawlessly on MyPaint.

Sharepoint 2013 Upload image javascript from html canvas DataURL

I try to upload image from dom element with canvas ( html2canvas.js ). and then i get dataURL() from canvas to upload. Upload is successful but i cant open my file. like a without file extention.

Here my code ;

 html2canvas(document.getElementById("wedding1"), {     letterRendering: 1,     allowTaint: true,     onrendered: function(canvas) {       console.log(canvas);     }   }).then(canvas => {     var imageData = canvas.toDataURL("image/png");     imageData.replace(/^data:image\/(png|jpg);base64,/, "");     let canvasImg = document.getElementById("canvasimg");     canvasImg.appendChild(canvas);       this.uploadFile("selam.png", imageData);    }); uploadFile(name, content) {   var createitem = new SP.RequestExecutor(     _spPageContextInfo.webAbsoluteUrl   );   createitem.executeAsync({     url:       _spPageContextInfo.webAbsoluteUrl +       "/_api/web/GetFolderByServerRelativeUrl('/DuyuruDocument')/Files/Add(url='" +       name +       "',overwrite=true)",     method: "POST",     binaryStringRequestBody: true,     body: content,     success: function(e) {       alert("done");     },     error: function() {       alert("Error");     },     state: "Update"   }); },