-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 109 isometric building workflow #156
Conversation
to cache the models & thumbnails
…scenario-labs/Scenario-Unity into 109-isometric-building-workflow
Add convert tile. Add convert sprite. Add independant behaviour on each inference. Tile Creator Generic Manage some errors Inactive button when any image is selected.
Icons were unavailable at the launching of unity, so we need to wait the disponibility of the asset.
package/Editor/Images/Images.cs
Outdated
/// </summary> | ||
/// <param name="_texture"></param> | ||
/// <param name="_onAction"></param> | ||
public static void DlAsTexture(Texture2D _texture, Action _onAction) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer full wording "DownloadAsTexture" + it miss the summary
package/Editor/Images/Images.cs
Outdated
/// <param name="_texture"></param> | ||
/// <param name="_selectedImageId"></param> | ||
/// <param name="_onAction"></param> | ||
public static void DlAsSprite(Texture2D _texture, string _selectedImageId, Action _onSuccessAction, Action _onDownloadingAction) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as "DlAsTexture"
package/Editor/Images/Images.cs
Outdated
@@ -162,5 +163,91 @@ public static Texture2D GetTextureByImageId(string _id) | |||
return imageData.texture; | |||
} | |||
|
|||
/// <summary> | |||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it miss the summary here
} | ||
|
||
/// <summary> | ||
/// Call the prompt window to generate one image per asset in the assetlist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not one image, but 4. the comment is incorrect
string tempName = assetName; | ||
bool useBaseTexture = baseTexture != null; | ||
string modelName = settings.isometricModels.Find(x => x.style == selectedModel).modelData.name; | ||
PromptWindow.GenerateImage(modelName, useBaseTexture, useBaseTexture, useBaseTexture ? baseTexture : null, 4, $"isometric, solo, centered, solid color background, {selectedTheme}, {assetName}", 30, 1024, 1024, 6, "-1", useBaseTexture, 0.8f, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make the prompt value "isometric, solo, centered, solid color background" as a variable so we can change it easily
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it's fix in a variable and that's mean in the futur we can have a custom prompt on it ?
@@ -9,6 +9,14 @@ namespace Scenario.Editor | |||
{ | |||
public class TileCreator | |||
{ | |||
#region Public Fields | |||
|
|||
public static TileCreator instance = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you call this variable "Instance" with a capitalized i ?
@@ -1,3 +1,4 @@ | |||
using Codice.CM.Common; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this namespace for ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My visual loves to add namespace ......
{ | ||
promptinputText = SerializeTags(tags); | ||
negativepromptinputText = SerializeTags(negativeTags); | ||
|
||
EditorPrefs.SetString("postedModelName", DataCache.instance.SelectedModelId); | ||
|
||
PromptFetcher.IsWorkflow = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this used for ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably an anticipation to workflows and futur one. This is used to say "It's workflow" so i have mutliple windows with a specific behaviour and with that we can avoid classic behaviours, like to the isometric workflow --> openning the Image window when generate inference, thanks to that we avoiding the Image Window because we have inference directly inside the isometric workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change the name accordingly ? Something like "silentFetch" or "silenceMode" or something in this flavor ?
{ | ||
if (string.IsNullOrEmpty(teamIdKey)) | ||
{ | ||
teamIdKey = EditorPrefs.GetString("TeamIdKey"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you save the string in "scenario/teamIdKey" like the other editor prefs plz ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ! I miss this !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you do it, it will break for everyone, everywhere. So I'm not a big fan of deleting saved settings of the users.
=> Don't change the old ones.
Manage generation from isometric workflow
Adding isometric workflow:
Main features:
Select Base and also custom base
select model
define and select prompt to generate assets
Select generated asset to convert as sprite, as a tile to tile palette, customize in webapp
Regenerate an inference
Restart workflow
closes: Isometric Building Workflow #109