René's URL Explorer Experiment


Title: CreateFromImageAsync Texture2D does not work async / SupportsTextureFormatNative error · Issue #2 · Looooong/UnityAsyncImageLoader · GitHub

Open Graph Title: CreateFromImageAsync Texture2D does not work async / SupportsTextureFormatNative error · Issue #2 · Looooong/UnityAsyncImageLoader

X Title: CreateFromImageAsync Texture2D does not work async / SupportsTextureFormatNative error · Issue #2 · Looooong/UnityAsyncImageLoader

Description: @Looooong I get the following error when calling CreateFromImageAsync from a thread: UnityException: SupportsTextureFormatNative can only be called from the main thread. Constructors and field initializers will be executed from the loadi...

Open Graph Description: @Looooong I get the following error when calling CreateFromImageAsync from a thread: UnityException: SupportsTextureFormatNative can only be called from the main thread. Constructors and field init...

X Description: @Looooong I get the following error when calling CreateFromImageAsync from a thread: UnityException: SupportsTextureFormatNative can only be called from the main thread. Constructors and field init...

Opengraph URL: https://github.com/Looooong/UnityAsyncImageLoader/issues/2

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CreateFromImageAsync Texture2D does not work async / SupportsTextureFormatNative error","articleBody":"@Looooong I get the following error when calling CreateFromImageAsync from a thread:\r\n\r\n\u003e UnityException: SupportsTextureFormatNative can only be called from the main thread.\r\n\u003e Constructors and field initializers will be executed from the loading thread when loading a scene.\r\n\r\nUnity 2020.3.1. AFAIK it's impossible to create a new Texture2D on anything but the main thread? Though that seems to render this whole repo useless, which I hope isn't the case cuz it looks GREAT otherwise!\r\n\r\nHere's the full stack trace:\r\n```\r\nUnityException: SupportsTextureFormatNative can only be called from the main thread.\r\nConstructors and field initializers will be executed from the loading thread when loading a scene.\r\nDon't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.\r\nUnityEngine.EditorSystemInfo.SupportsTextureFormat (UnityEngine.TextureFormat format) (at \u003c10564ed154d647e194bef4aef8878649\u003e:0)\r\nUnityEngine.SystemInfoShimBase.SupportsTextureFormat (UnityEngine.TextureFormat format) (at \u003c10564ed154d647e194bef4aef8878649\u003e:0)\r\nUnityEngine.SystemInfo.SupportsTextureFormat (UnityEngine.TextureFormat format) (at \u003c10564ed154d647e194bef4aef8878649\u003e:0)\r\nUnityEngine.Texture.ValidateFormat (UnityEngine.TextureFormat format) (at \u003c10564ed154d647e194bef4aef8878649\u003e:0)\r\nUnityEngine.Texture2D..ctor (System.Int32 width, System.Int32 height, UnityEngine.TextureFormat textureFormat, System.Int32 mipCount, System.Boolean linear, System.IntPtr nativeTex) (at \u003c10564ed154d647e194bef4aef8878649\u003e:0)\r\nUnityEngine.Texture2D..ctor (System.Int32 width, System.Int32 height, UnityEngine.TextureFormat textureFormat, System.Int32 mipCount, System.Boolean linear) (at \u003c10564ed154d647e194bef4aef8878649\u003e:0)\r\nAsyncImageLoader+ImageImporter+\u003cCreateNewTextureAsync\u003ed__17.MoveNext () (at Assets/UnityAsyncImageLoader/Runtime/ImageImporter.cs:100)\r\n--- End of stack trace from previous location where exception was thrown ---\r\nSystem.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () (at \u003ceae584ce26bc40229c1b1aa476bfa589\u003e:0)\r\nSystem.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) (at \u003ceae584ce26bc40229c1b1aa476bfa589\u003e:0)\r\nSystem.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) (at \u003ceae584ce26bc40229c1b1aa476bfa589\u003e:0)\r\nSystem.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) (at \u003ceae584ce26bc40229c1b1aa476bfa589\u003e:0)\r\nSystem.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () (at \u003ceae584ce26bc40229c1b1aa476bfa589\u003e:0)\r\nAsyncImageLoader+\u003cCreateFromImageAsync\u003ed__9.MoveNext () (at Assets/UnityAsyncImageLoader/Runtime/AsyncImageLoader.cs:105)\r\nUnityEngine.Debug:LogException(Exception)\r\n\u003cCreateFromImageAsync\u003ed__9:MoveNext() (at Assets/UnityAsyncImageLoader/Runtime/AsyncImageLoader.cs:108)\r\nSystem.Threading._ThreadPoolWaitCallback:PerformWaitCallback()\r\n```\r\nand the method I'm calling it from:\r\n```\r\nprivate static async Task\u003cTexture2D\u003e ByteArrayToTexture2D(byte[] bytes)\r\n{\r\n    return await AsyncImageLoader.CreateFromImageAsync(bytes);\r\n}\r\n```","author":{"url":"https://github.com/nickyonge","@type":"Person","name":"nickyonge"},"datePublished":"2021-10-11T22:40:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/2/UnityAsyncImageLoader/issues/2"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d1e634c0-ee95-5732-9ab4-db7cda3255d1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA69C:190AD7:60D9ED:809142:6A5B44AB
html-safe-noncea998f7f58b6de616d457a01d6f595afc7060be87b88f6b5549d16ad02d8f7f7f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjlDOjE5MEFENzo2MEQ5RUQ6ODA5MTQyOjZBNUI0NEFCIiwidmlzaXRvcl9pZCI6IjI1MTM4OTYyNTkzOTczOTgxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4f2ca8a5589441d0853727c13948651378f9540d229a3dcdef96d1754a965e75
hovercard-subject-tagissue:1023178342
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/Looooong/UnityAsyncImageLoader/2/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d65c7ffef4f8f0e3db715bb890255b2e3c05f50c1f64d08ebccae1ef8640176b/Looooong/UnityAsyncImageLoader/issues/2
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d65c7ffef4f8f0e3db715bb890255b2e3c05f50c1f64d08ebccae1ef8640176b/Looooong/UnityAsyncImageLoader/issues/2
og:image:alt@Looooong I get the following error when calling CreateFromImageAsync from a thread: UnityException: SupportsTextureFormatNative can only be called from the main thread. Constructors and field init...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamenickyonge
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
go-importgithub.com/Looooong/UnityAsyncImageLoader git https://github.com/Looooong/UnityAsyncImageLoader.git
octolytics-dimension-user_id8206622
octolytics-dimension-user_loginLooooong
octolytics-dimension-repository_id389617796
octolytics-dimension-repository_nwoLooooong/UnityAsyncImageLoader
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id389617796
octolytics-dimension-repository_network_root_nwoLooooong/UnityAsyncImageLoader
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/Looooong/UnityAsyncImageLoader/issues/2#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLooooong%2FUnityAsyncImageLoader%2Fissues%2F2
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FLooooong%2FUnityAsyncImageLoader%2Fissues%2F2
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=Looooong%2FUnityAsyncImageLoader
Reloadhttps://github.com/Looooong/UnityAsyncImageLoader/issues/2
Reloadhttps://github.com/Looooong/UnityAsyncImageLoader/issues/2
Reloadhttps://github.com/Looooong/UnityAsyncImageLoader/issues/2
Looooong https://github.com/Looooong
UnityAsyncImageLoaderhttps://github.com/Looooong/UnityAsyncImageLoader
Please reload this pagehttps://github.com/Looooong/UnityAsyncImageLoader/issues/2
Notifications https://github.com/login?return_to=%2FLooooong%2FUnityAsyncImageLoader
Fork 27 https://github.com/login?return_to=%2FLooooong%2FUnityAsyncImageLoader
Star 214 https://github.com/login?return_to=%2FLooooong%2FUnityAsyncImageLoader
Code https://github.com/Looooong/UnityAsyncImageLoader
Issues 11 https://github.com/Looooong/UnityAsyncImageLoader/issues
Pull requests 0 https://github.com/Looooong/UnityAsyncImageLoader/pulls
Actions https://github.com/Looooong/UnityAsyncImageLoader/actions
Projects https://github.com/Looooong/UnityAsyncImageLoader/projects
Security and quality 0 https://github.com/Looooong/UnityAsyncImageLoader/security
Insights https://github.com/Looooong/UnityAsyncImageLoader/pulse
Code https://github.com/Looooong/UnityAsyncImageLoader
Issues https://github.com/Looooong/UnityAsyncImageLoader/issues
Pull requests https://github.com/Looooong/UnityAsyncImageLoader/pulls
Actions https://github.com/Looooong/UnityAsyncImageLoader/actions
Projects https://github.com/Looooong/UnityAsyncImageLoader/projects
Security and quality https://github.com/Looooong/UnityAsyncImageLoader/security
Insights https://github.com/Looooong/UnityAsyncImageLoader/pulse
CreateFromImageAsync Texture2D does not work async / SupportsTextureFormatNative errorhttps://github.com/Looooong/UnityAsyncImageLoader/issues/2#top
good first issueGood for newcomershttps://github.com/Looooong/UnityAsyncImageLoader/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
wontfixThis will not be worked onhttps://github.com/Looooong/UnityAsyncImageLoader/issues?q=state%3Aopen%20label%3A%22wontfix%22
https://github.com/nickyonge
nickyongehttps://github.com/nickyonge
on Oct 11, 2021https://github.com/Looooong/UnityAsyncImageLoader/issues/2#issue-1023178342
@Looooonghttps://github.com/Looooong
good first issueGood for newcomershttps://github.com/Looooong/UnityAsyncImageLoader/issues?q=state%3Aopen%20label%3A%22good%20first%20issue%22
wontfixThis will not be worked onhttps://github.com/Looooong/UnityAsyncImageLoader/issues?q=state%3Aopen%20label%3A%22wontfix%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.